This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes PHP and the fly likes Problem in array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Languages » PHP
Bookmark "Problem in array" Watch "Problem in array" New topic
Author

Problem in array

Aniket S. Kulkarni
Ranch Hand

Joined: Jun 15, 2011
Posts: 87

Hi!!!

I need help on array.

Code:


Output:= 1234Array

I know $data is array it is not variable, but if I print as variable($data) result is Array. Why?

[Edit - added code tags - MB]


Aniket Kulkarni
Oracle Certified Professional, Java SE 6 Programmer.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

pirnt just show you the variable type in case of array, and php has another function to print the array. print_r ($data);


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Aniket S. Kulkarni
Ranch Hand

Joined: Jun 15, 2011
Posts: 87

Thanks!!!
I tried print_r($data); it is nice. It reduces overhead of writing each array element.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in array
 
Similar Threads
Writing to web space from Java applet.
Pagination Problem
displaying a variable that i have declared and in scriptlet
Dynamic marquee
noob needs help