I tried this: $whatsit="2"; echo "value is".var_dump($whatsit)."<br/>"; how can i get an output of this: string(1) "2" value is Can any one pls explain?? Thanks in advance
var_dump displays the contents of a variable. It returns a void(null) value so you can't use it in a echo/print statement nor assign it to a variable. In other words, it's not an ''r-value." $whatsit='2'; echo '<pre>'; echo 'Value is: '; var_dump($whatsit); echo '<pre>'; // Outputs: Value is: string(1) "2" Code (markup):