| Subject: | give example how to store and... |  
| Summary: | Package rating comment |  
| Messages: | 18 |  
| Author: | synthetron |  
| Date: | 2010-05-28 12:11:34 |  
| Update: | 2010-06-01 09:12:29 |  
|   |  
 
 | 
 | 
synthetron rated this package as follows:
| Utility:  | Insufficient | 
| Consistency:  | Not sure | 
| 
 | 
  synthetron - 2010-05-28 12:11:34  
give example how to store and retrieve variables 
  
  Stephen R Mann - 2010-05-28 12:54:50 -  In reply to message 1 from synthetron 
I agree. As a total novice to PHP programming, examples help me learn faster. 
 
  
  synthetron - 2010-05-28 13:41:26 -  In reply to message 2 from Stephen R Mann 
  
  Domenico Pontari - 2010-05-28 17:19:04 -  In reply to message 1 from synthetron 
done 
  
  synthetron - 2010-05-29 07:37:42 -  In reply to message 4 from Domenico Pontari 
 i try 
 
 
$myVar2 = 'http://www.google.com'; 
 $storage->setObj ('link', $myVar2); 
 $storedVar = $storage->getObj ('storedVar'); 
 
    echo 'Dump for storedVar: '; 
 
    var_dump ($storedVar); 
 
 
i dont c difference 
 
how to to getvar('link')  
and get the google link as result 
 
 
 
in the example of the other author it is so easy to put en get vars  
  
  synthetron - 2010-05-29 07:41:14 -  In reply to message 5 from synthetron 
at last found it 
 
 
echo "<hr>"; 
$myVar2 = 'http://www.google.com'; 
 $storage->setObj ('link', $myVar2); 
 $storedVar = $storage->getObj ('link'); 
 
    echo 'Dump for link: '; 
 
    var_dump ($storedVar); 
echo "<hr>"; 
echo $storedVar; 
  
  synthetron - 2010-05-29 07:52:12 -  In reply to message 6 from synthetron 
 
$br='<br>'; 
echo 'format '.$storedVar['format'].$br; 
echo 'number '.$storedVar['number'].$br; 
 
not working 
  
  Domenico Pontari - 2010-05-29 09:41:38 -  In reply to message 7 from synthetron 
As you can see dumping $storedVar, it is a stdObject not an array. So that: 
 
$br='<br>'; 
echo 'format '.$storedVar->format.$br; 
echo 'number '.$storedVar->number.$br; 
 
will work 
  
  synthetron - 2010-05-29 13:10:21 -  In reply to message 8 from Domenico Pontari 
tx 
 
almost there 
 
what gets into $storedvar if link does not exist? 
 
 
 $storedVar = $storage->getObj ('link'); 
  
  synthetron - 2010-05-29 13:32:37 -  In reply to message 9 from synthetron 
when key not exist 
 
echo "<hr>"; 
$storedVar = $storage->getObj ('zzz'); 
 
echo 'zzz: '.$storedVar; 
echo "<hr>"; 
var_dump ($storedVar); 
 
 
 
it blocks just on hr 
 
getobj ld return errorcode then 
 
 
  
   |