note 18727 added to function.exec
| From: | hans at internit dot NO_SPAM dot com | Date: | Sat, 02 Feb 2002 07:25:02 +0000 |
| Subject: | note 18727 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26150@lists.php.net to get a copy of this message | ||
From what I've gathered asking around, there is no way to pass back a perl array into a php
script using the exec function.
The suggestion is to just print out your perl array variables at the end of your script, and then
grabbing each array member from the array returned by the exec function. If you will be passing
multiple arrays, or if you need to keep track of array keys as well as values, then as you print
each array or hash variable at the end of your perl script, you should concatenate the value with
the key and array name, using an underscore, as in:
foreach (@array) print "(array name)_(member_key)_($_)" ;
Then you would simply iterate through the array returned by the exec function, and split each
variable along the underscore.
Here I like to especially thank Marat for the knowledge. Hope this is useful to others in search for
similar answer!
--
http://www.php.net/manual/en/function.exec.php
http://master.php.net/manage/user-notes.php?action=edit+18727
http://master.php.net/manage/user-notes.php?action=delete+18727
http://master.php.net/manage/user-notes.php?action=reject+18727