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 írta:
> OK so I have seen enough errors about split, so I decided to update my co
Hi,
PHP parser is not enabled ( module not enabled or not associated with
.php/.html/.htm files! )
Cheers,
Tamas
-Original Message-
From: Joseph Adenuga [mailto:jadenu...@yahoo.com]
Sent: Monday, October 17, 2011 3:55 PM
To: php-general@lists.php.net
Cc: jadenu...@yahoo.com
Sub
Hi,
Surely there's a wiki/doc somewhere :)
But for the start:
1) plan what exactly you want to accomplish ( functionality )
2) complexity
- if simple, just throw it in one php ( like index.php )
- if more complex, you can separate the pages and/or use classes
3) based on 2), plan
While no tusing just one while loop?
$num = 0;
while ( ( $row = mysql_fetch_assoc($result) ) && $num++ <= 1000 ) {
//do whatever you want and you'll get all results or max. 1000 lines (
whatever comes first )
}
Cheers,
Tom
-Original Message-
From: Tim Streater [mailto:t
Or the query should look like this, if there is a 'headline' field:
UPPER(`headline`) LIKE '%".mysql_real_escape_string(trim(strtoupper($find)))."%'
Cheers,
Tamas
-Original Message-
From: Andrew Ballard [mailto:aball...@gmail.com]
Sent: Tuesday, August 09, 2011 4:55 PM
To: Davi
;([>]+From )/','$1', $line)
Cheers,
Tamas
-Original Message-
From: Tim Streater [mailto:t...@clothears.org.uk]
Sent: Sunday, July 24, 2011 8:51 PM
To: Dajka Tamás; PHP General List
Subject: Re: RE: [PHP] Use of preg_replace
On 24 Jul 2011 at 19:35, Dajka Tamás
Hi,
I lost trail, what do you want to do?
You want to convert
>>>From
to this:
>>From
Or what's the goal?
Cheers,
Tamas
-Original Message-
From: Tim Streater [mailto:t...@clothears.org.uk]
Sent: Sunday, July 24, 2011 8:07 PM
To: PHP General List
Subject: [PHP] Use of preg_
.com]
Sent: Tuesday, July 05, 2011 5:47 PM
To: Robert Cummings
Cc: Dajka Tamás; php-general@lists.php.net
Subject: Re: [PHP] Foreach question
Just use count($arr) in your for-header, as it get's executed again
for each loop.
1), array('id'=>2))
Thanks, that was interesting :) I think I got one step further in understanding
PHP :)
BTW, I've changed the loop to 'for' and it's working well :)
-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Tuesday, July 05, 2011 4:45 PM
To:
l always return true
with two elements? ( since the first elements copy is pushed as third element,
etc )
-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Tuesday, July 05, 2011 4:28 PM
To: Dajka Tamás
Cc: php-general@lists.php.net
Subject: Re: [PHP] Foreach q
Tried, gives the same result with one element :(
What's working:
$cats = array( array( 'id' => 1 ) );
while ( $c = array_shift($cats) ) {
echo $c['id'];
if ( $c['id'] < 5 ) {
$c['id']++;
$cats[] = $c;
}
}
But this is 'while' and it pops all
Hi,
Yeah, I'm really want to do that, since I'm working with the elements of the
original array ( skipped that part in sample code ).
I've tried your suggestion, but it gives the same result, so on just one input
is just gives back '1'.
What troubles me, that foreach gives an inconsistent work
12 matches
Mail list logo