[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [MISC] PHP assigment



Mads Bondo Dydensborg wrote:

> Damn. Jeg har flere klasser, der bruger andre klasser, f.eks.

Nu er jeg ikke helt skrap i klasser og derfor heller ikke
bekendt med det scope de operere i.

> 
 $ged
> class a {
    global $ged;
>   function a($minged) {
>     $ged = $minged
>   }
>   ..
> }

men det var nok ikke det du mente.
måske skal 'global' bare stå et andet sted.

> Hvor jeg gerne vil nøjes med, globalt set, at have een forekomst af $ged.

Men må den kun kunne ses i class'erne?

> Måske kan jeg lave noget med $$var konstruktionen. Hmmm.

 $a = "ged";
 $$a = "hej";
 nu er $ged == "hej"

 &-tegn bruges med fordel når man har flere variable
 og gerne vil indholdet retur.

function ged( $var1, $var2 ) {
 $var1 = date("YmD");
 $var2 = strlen($var1);
}

 ged( &$dato, &$laengde );

-- 
best regards
+---------------------------------------------------+
! Hans Schou,    Hamletsgade 4-201,   DK-2200 Kbh N !
! Telex: SCHOU.DK            Phone: +45 35 86 12 66 !
! mailto:sslug@sslug         http://www.schou.dk !
+---------------------------------------------------+
 Food for Echelon: Anarchist's Distributed Calendar
    nuclear bomb and potatoes and NSA for sale


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:10 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *