Site Tools


onny:notizen:programmierung

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
onny:notizen:programmierung [2026/06/30 09:47] – [php] 10.250.0.1onny:notizen:programmierung [2026/06/30 13:24] (current) – [php] 10.250.0.1
Line 529: Line 529:
 </code> </code>
  
-enable debugging error log+print array 
 +<code php> 
 +$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z')); 
 +print_r($a); 
 +</code>
  
 +assosiative array / dictionary
 +<code php>
 +$myResult["ids"] = [123, 125, 127];
 +</code>
 +
 +datetime object, convert to string
 +<code php>
 +$date = new \DateTime('1990-01-01');
 +$dateString = $date->format('d.m.Y');
 +</code>
 +
 +enable debugging / error log
 <file - /etc/php/conf.d/debug.ini> <file - /etc/php/conf.d/debug.ini>
 display_startup_errors = true display_startup_errors = true
onny/notizen/programmierung.1782812862.txt.gz · Last modified: by 10.250.0.1