Re: PHP array to char **

From: Date: Tue, 15 Mar 2005 01:46:33 +0000
Subject: Re: PHP array to char **
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-15447@lists.php.net to get a copy of this message
Christopher Kings-Lynne wrote:
Hi, I'm working on some improvements to the pgsql extension and I would like to know how to convert a zval* that points to a PHP array to a char** that I can pass to the pgsql API functions. The API function takes const char** so it will not modify the string, but the string must exist for the duration of the API call... I've been looking at other code that does similar things, but I can't help wondering if there is a simple, straightforward way of doing it?
Just look at ext/standard/array.c There are dozens of examples of how to walk a HashTable in there. -Rasmus

« previous php.internals (#15447) next »