Well, there is an easier way to get what you want. To print data of your array use this approach and you'll know the contents of your array and multi-dimensional array
$array[0] = "1"; $array[1] = "2"; $array[3] = "3"; print_r($array);
After you launch the script, right click the page and select View Source. The result:
Array ( [0] => 1 [1] => 2 [2] => 3 )
Use the same approach to print your object properties quickly:
class Sample{ public $example = 5; } $test = new Sample(); print_r($test);
The output for object properties is:
Sample Object ( [example:Sample:public] => 5 )
Making testing easier one step at a time.
No comments:
Post a Comment