Re: Is there function to separate print associative array



From: "prasath_linux" <prasath.tvs@xxxxxxxxx>
Hi,

Is there any possible function to print the associative array. We
have print_r() function in PHP to display the associative array.
Likwise is there any function in perl to print associative array.

Thanks in advance.



You can use:

use Data::Dump qw(pp);

my %hash = (a => 1, b => 2);

print pp(\%hash);

Octavian

.



Relevant Pages

  • Re: Paging system for an array
    ... Bruno wrote: ... > associative array which needs to be limited to displaying just the first ... I've used the following code to display the whole lost but how ...
    (alt.php)
  • Re: Save an Image to a file
    ... associative array with key-value pairs, and as far as I know, there is ... might be able to get away with using PHP. ... binmode TEST; ...
    (comp.lang.java.programmer)
  • RE: [PHP] finding the index name of an associative array
    ... [PHP] finding the index name of an associative array ... Is there an iterative way to find out the array index values ('a', ... Checked by AVG Free Edition. ...
    (php.general)
  • Re: I almost get what youre saying...
    ... but I'm so new to PHP that I need just a "little more" pointing.... ... From reading the docs, I understand that I need to pull from an associative array, and you are correct that "$venuecity = $attrs". ... function startElement($parser, $name, $attrs) { ... if ($insideitem) { ...
    (php.general)
  • Re: $HTTP_SERVER_VARS[SCRIPT_FILENAME] - getting all GET vars too?
    ... $_SERVER would be preferred, ... How do I also get the GET variables using PHP as a ... >complete string. ... same as any associative array. ...
    (comp.lang.php)