473,465 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dumping an array to a web page

Is there some quick way to dump an array to a webpage and have it show
up neatly formatted rather than the typical blob-o-text?

Thanks,

--Yan
Jan 30 '07 #1
5 1712
Rik
CptDondo <ya*@NsOeSiPnAeMr.comwrote:
Is there some quick way to dump an array to a webpage and have it show
up neatly formatted rather than the typical blob-o-text?

Thanks,

--Yan
echo '<pre>';
var_dump($var);
echo '</pre>';
--
Rik Wasmus
Jan 30 '07 #2
On Jan 30, 12:28 pm, Rik <luiheidsgoe...@hotmail.comwrote:
CptDondo <y...@NsOeSiPnAeMr.comwrote:
Is there some quick way to dump an array to a webpage and have it show
up neatly formatted rather than the typical blob-o-text?
Thanks,
--Yan

echo '<pre>';
var_dump($var);
echo '</pre>';

--
Rik Wasmus
there is also print_r() which is much nicer for arrays imo

print "<pre>";
print_r($arr);
print "</pre>";

Jan 30 '07 #3
Rik
bo*********@gmail.com <bo*********@gmail.comwrote:
On Jan 30, 12:28 pm, Rik <luiheidsgoe...@hotmail.comwrote:
>CptDondo <y...@NsOeSiPnAeMr.comwrote:
Is there some quick way to dump an array to a webpage and have it show
up neatly formatted rather than the typical blob-o-text?
Thanks,
--Yan

echo '<pre>';
var_dump($var);
echo '</pre>';

--
Rik Wasmus

there is also print_r() which is much nicer for arrays imo

print "<pre>";
print_r($arr);
print "</pre>";
Well, in my code it sometimes matters wether I have an integer '1' or a
string '1', hence the var_dump.If you don't need it the layout of print_r
is indeed somewhat 'nicer'.
--
Rik Wasmus
Jan 31 '07 #4
Following on from Rik's message. . .
>Well, in my code it sometimes matters wether I have an integer '1' or a
string '1', hence the var_dump.If you don't need it the layout of print_r
is indeed somewhat 'nicer'.
Please could you post a list of projects you've worked on so I can avoid
having anything to do with them.

--
PETER FOX Not the same since the pancake business flopped
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Jan 31 '07 #5
Rik
Peter Fox <pe******@eminent.demon.co.uk.not.this.bit.no.html wrote:
Following on from Rik's message. . .
>Well, in my code it sometimes matters wether I have an integer '1' or a
string '1', hence the var_dump.If you don't need it the layout of
print_r
is indeed somewhat 'nicer'.

Please could you post a list of projects you've worked on so I can avoid
having anything to do with them.
Hey!

It's by choice and design, not by PHP :P
Sometimes I hate variable vars....
--
Rik Wasmus
Jan 31 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Greg Brant | last post by:
Hi, how can i backup a table / entire DB and get the index's as well as the data / create table's etc cheers Greg
10
by: ken | last post by:
hello, i'm writing a c program on a linux system. i'm debugging a segmentation fault but i don't want it to dump a core file because the memory footprint of the program is over 300Mb and i don't...
3
by: noleander | last post by:
My Vis C++ program takes forever to exit. Reason: it is dumping potential memory leaks. I like finding leaks once a month, but not every time I run. How do I turn mem leak dumping off? I...
31
by: rkk | last post by:
Hi, I've written a small trim function to trim away the whitespaces in a given string. It works well with solaris forte cc compiler, but on mingw/cygwin gcc it isn't. Here is the code: char...
5
by: news.microsoft.com | last post by:
I'm strongly considering abandoning the one-physical-file-per-page model and going with an arcitecture that simply loads content from classes dynamically. There will be only one page that a user...
3
by: Brian.Abernathy | last post by:
This is probably a simple thing to do, and it seems like I managed to do this a few years ago, but I can't find a good example. I'm trying to create a 'generic' page that I can call during my...
7
by: gomzi | last post by:
hi, I would like to know the command for dumping stored procedures. Thought that I knew the command and dumped the db using the -R option, only to realise that dumping of procedures had failed...
2
by: Javilen | last post by:
Hello, I want to place the contents of a CSV file into an array. The csv file looks as follows: CG.A1300.CB24.KREG176E,BEYYMMDD CG.A1300.CB24.KREG176F,BFYYMMDD...
3
by: Rowan | last post by:
I'm trying to enter data from an array ( eg entry1=(x=>y,a=b), entry2=(x=>y,a=>c)) I'm trying to use place holders to dump the data. It maybe late but I can't get this to work. below is the actual...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.