[PHP-DB] Functions

2004-11-23 Thread Yemi Obembe
Hi wizs,
Anybody knows any fuction that can count occurence of a character in a string 
(not in a array). 



-

A passion till tomorrow,
www.opeyemi.tk





-
Do you Yahoo!?
 Discover all that’s new in My Yahoo!

[PHP-DB] preg_math vs preg_match_all

2004-11-23 Thread Yemi Obembe
Just want to know the difference between preg_match and preg_match_all. And by 
the way (though this is off the subject), how can I alter the 
$_SERVER['HTTP_USER_AGENT'] so that instead of outputting d browser it gives 
outputs a variable i av already defined.



-

A passion till tomorrow,
www.opeyemi.tk





-
Do you Yahoo!?
 Meet the all-new My Yahoo! – Try it today! 

Re: [PHP-DB] preg_math vs preg_match_all

2004-11-23 Thread Gerard Samuel
Yemi Obembe wrote:
Just want to know the difference between preg_match and preg_match_all.
preg_match stops after the first match.
preg_match_all gets *all* the matches.
E.g.  If you have a string -> $str = "foofoo";
preg_match('/foo/', $str, $match); -> $match will have an array with one 
"foo".
preg_match_all('/foo/', $str, $match); -> $match will have an array with 
two "foo".

Thats basically it.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Functions

2004-11-23 Thread Bastien Koert
http://ca.php.net/manual/en/function.substr-count.php
From: Yemi Obembe <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Functions
Date: Tue, 23 Nov 2004 00:59:11 -0800 (PST)
Hi wizs,
Anybody knows any fuction that can count occurence of a character in a 
string (not in a array).


-
A passion till tomorrow,
www.opeyemi.tk


-
Do you Yahoo!?
 Discover all that’s new in My Yahoo!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php