OK so I have seen enough errors about split, so I decided to update my code:
return split(/, $sPath, $iMax);
I tried:
return preg_split(/, $sPath, $iMax);
return preg_split(/, $sPath, $iMax, PREG_SPLIT_DELIM_CAPTURE);
and a few other combinations, in the end always with errors. not
On Tue, Dec 13, 2011 at 15:33, Jack jacklistm...@gmail.com wrote:
OK so I have seen enough errors about split, so I decided to update my code:
return split(/, $sPath, $iMax);
I tried:
return preg_split(/, $sPath, $iMax);
return preg_split(/, $sPath, $iMax, PREG_SPLIT_DELIM_CAPTURE);
Hi,
First, read the help of 'preg_replace' at php.net.
Second: try this: preg_split('/\//',$sPath,$iMax)
Third: use explode: explode('/',)
Cheers,
Tamas
2011.12.13. dátummal, 21:33 időpontban Jack jacklistm...@gmail.com írta:
OK so I have seen enough errors about split, so I
Hi folks,
Let's say that I have the following array:
[0]=
array(35) {
[contact_id]=
string(3) 356
[contact_first_name]=
string(4) Marc
}
[1]=
array(35) {
[contact_id]=
string(3) 247
[contact_first_name]=
string(4) Marc
}
[2]=
array(35) {
Holy mother of multidimentionality there are a ton of suggested
solutions to this scenerio on the array_unique manual page..
http://php.net/manual/en/function.array-unique.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2011-12-13 at 16:15 -0500, Marc Guay wrote:
Hi folks,
Let's say that I have the following array:
[0]=
array(35) {
[contact_id]=
string(3) 356
[contact_first_name]=
string(4) Marc
}
[1]=
array(35) {
[contact_id]=
string(3) 247
On Tue, Dec 13, 2011 at 10:15 PM, Marc Guay marc.g...@gmail.com wrote:
Hi folks,
Let's say that I have the following array:
[0]=
array(35) {
[contact_id]=
string(3) 356
[contact_first_name]=
string(4) Marc
}
[1]=
array(35) {
[contact_id]=
string(3) 247
If the contact_id is the primary key, you could also use that as array
index, which would automatically filter duplicates.
Thanks for this, it's so obvious I didn't see it. I was adding items
to the array with $array[] = $contact when I could have just as easily
used $array[$contact['id']] =
Marc Guay wrote:
If the contact_id is the primary key, you could also use that as array
index, which would automatically filter duplicates.
Thanks for this, it's so obvious I didn't see it. I was adding items
to the array with $array[] = $contact when I could have just as easily
used
Hello,
It appears to me that something is strange with the socket_select function.
From what I understand the value of the fourth parameter, tv_sec,
should block the execution of the script for that number of seconds.
I tried this code :
?php
error_reporting(E_ERROR);
$serverSocket =
On Wed, Dec 14, 2011 at 12:11 AM, Mihai Anghel mihaigrim1...@gmail.com wrote:
Hello,
It appears to me that something is strange with the socket_select function.
From what I understand the value of the fourth parameter, tv_sec,
should block the execution of the script for that number of
Anyone?:-(
is my description too unclear?
On 11.12.2011, at 11:25, Nils Leideck wrote:
this is my first post to the PHP general list.
I have an issue with a variable variable
(http://php.net/manual/en/language.variables.variable.php)
My use case:
I have an array called $myArray.
On 12/13/2011 5:43 PM, Nils Leideck wrote:
Anyone?:-(
is my description too unclear?
On 11.12.2011, at 11:25, Nils Leideck wrote:
this is my first post to the PHP general list.
I have an issue with a variable variable
(http://php.net/manual/en/language.variables.variable.php)
My use
Hi Al,
many thanks for your feedback. Unfortunately I don’t know the deepness of the
array so I can’t use the nested foreach() idea :-( Let me try to simplify my
question (which also helps myself to clarify my process ;-)
I have a variable where the value is a string that is exactly the path
On Wed, Dec 14, 2011 at 9:27 AM, Nils Leideck nils.leid...@leidex.net wrote:
Hi Al,
many thanks for your feedback. Unfortunately I don’t know the deepness of the
array so I can’t use the nested foreach() idea :-( Let me try to simplify my
question (which also helps myself to clarify my
15 matches
Mail list logo