Questions tagged [var-dump]

var_dump is a PHP function that dumps information about a variable.

var_dump is a PHP function that dumps information about a variable.

Examples

$a=array(1,2,3);
var_dump($a);
$b="hello so";
var_dump($b);

returns

array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
string(8) "hello so"

References

332 questions
0
votes
0 answers

$_POST Undefined index but var_dump show the key in array

When the form is submitted I get a error Notice: Undefined index: inputValorFrete in /home/... Because I try to access an array key inputValorFrete.
Diogo Rodrigues
  • 1,312
  • 15
  • 15
0
votes
0 answers

CakePHP controller not receiving data

When I post form data I'm "var_dump"-ing it back to see what happens. The form in my app is quite complex, I have data for 5 different models in it, and it goes 3 levels "deep". Service data for example is structired like…
Luka
  • 255
  • 1
  • 5
  • 16
0
votes
3 answers

Having Trouble Getting a MySQL Query Result into a PHP Array

I am trying to get a mysql query result into a PHP array. When I run my script and print the array, it does not display the information that it gets from the mysql table and instead just displays information about the array. Here is my…
aCarella
  • 2,369
  • 11
  • 52
  • 85
0
votes
3 answers

var_dump returns bool(false)

I am absolute beginner with php and mysql .. i want to put (year, month, demand) in the (table) in database but var_dump shows Bool(false) and nothing is being passed to the database ... it is also shows successfully registered alert. here is my…
Ahmed Ragab
  • 37
  • 1
  • 9
0
votes
2 answers

how can i fix php var_dump error

I am trying to use php to verify my html form a file.txt in witch i have a login , password. the problem in my php code that even when the variables are equal i get false when i compare them.The only exception is when i compare the first login and…
Emb_user
  • 249
  • 1
  • 2
  • 7
0
votes
2 answers

php var_dump returning null for specific elements of assoc array but not whole array

I have a multidimensional object called $videos which contains a number of video objects. I cast my $videos object to an array as follows $videos = (array)$videos When I var_dump($videos) it returns all of the data from $videos as shown below…
0
votes
1 answer

Is there a way to output HTML within Firebug's console?

I'm using Firebug's console.log() to output Xdebug's var_dump() result and it looks like this:
array (size=1)
  'offset' => string 
        
vito78
  • 35
  • 5
0
votes
1 answer

PHP var_dump of XML from simplexml_load_string

I have an XML object created by simplexml_load_string from the following XML:
NickJ
  • 9,380
  • 9
  • 51
  • 74
0
votes
1 answer

Store the result of var_dump in mysql

I have a form contains many text box,checkbox,radio etc. for the posting page i used var_dump to capture result. I need to store the result of var_dump in mysql . Is it possible?
0
votes
0 answers

echo, var_dump() and print_r() interrupts output

I'm trying to configure php/mysql on Mac (via MAMP) and strange problem occurs. The project uses Zend Framework 2 and I'm trying to debug it simply putting var_dump(); If I do this only var_dump() renders but no web site content. Same branch and…
0
votes
3 answers

Invalid argument supplied for foreach() due to var_dump is null

Yesterday when I var_dump($this->m_test->result_getGrades());it gave me an array[1356] now it returned null. Can anyone help me figure out why it's NULL? I'm still new in PHP and Codeigniter and its pretty stressful figuring out why I can't retrieve…
Natty Guurl
  • 125
  • 1
  • 3
  • 18
0
votes
0 answers

imagecreatetruecolor contains which values?

Code is pretty much self explanatory... I was wonder what $canvas is carry after setting imagecreatetruecolor(360,240) $canvas=imagecreatetruecolor(360,240); var_dump($canvas); Output : resource(2) of type (gd) How can I really get what's going…
iprophesy
  • 175
  • 3
  • 9
0
votes
0 answers

Fetch all variables from external php file

Title is pretty much self explanatory... Here is my code : $myVars=file_get_contents('1.php'); highlight_string($myVars); $ignore=array('GLOBALS', '_FILES', '_COOKIE', '_POST', '_GET', '_SERVER',…
iprophesy
  • 175
  • 3
  • 9
0
votes
3 answers

hard to read when doing var_dump

I have recently installed the new wampserver 2.5 (with php 5.5.12) due to a problem I had with the wamp I had installed on my laptop. The thing is that when doing var_dump the info is not displayed as it used to display, the new format is for…
Limon
  • 1,772
  • 7
  • 32
  • 61
0
votes
2 answers

PHP var_dump only outputting value of bottom checkbox

Hi and thanks for reading my question. I am using a simple form to get some input :

Select your favorite two countries below: