php-general Digest 14 Nov 2010 20:49:18 - Issue 7036
Topics (messages 309478 through 309480):
Re: confusion about the file extension for php interpreter to interpret
309478 by: Sharl.Jimh.Tsin
309479 by: »ÝÐÂå·
Re: String manipulation
309480 by: Ron Piggott
How would I write an IF statement that looks for the first space space (“ “)
left of the 76th character in a string or br, which ever comes first --- OR
the end of the string (IE the string is less than 76 characters long? I
specifically want is it’s character position in the string. Ron
The
What about something like this:
$pos = (strpos(' ', $string, 76))?strpos(' ',$string, 76):strlen($string);
Thanks,
Ash
http://www.ashleysheridan.co.uk
- Reply message -
From: Ron Piggott ron.pigg...@actsministries.org
Date: Sun, Nov 14, 2010 20:48
Subject: [PHP] Re: String manipulation
On 11/14/10 2:48 PM, Ron Piggott wrote:
How would I write an IF statement that looks for the first space space (“ “) left of
the 76th character in a string orbr, which ever comes first --- OR the end of
the string (IE the string is less than 76 characters long? I specifically want is
it’s
I am receiving this error:
Warning: strpos() [function.strpos]: Offset not contained in string
I have never seen it before, what do I do? I made one change to it though, you
didn’t have br in it before so I changed the syntax to:
$pos = (strpos(' ', $activity_description_result,
Hello List.
I have a sql command that counts, groups and sorts data from a table.
I need to insert the results of that sql command into different table.
My sql SELECT looks like this:
select count(*) as count, searchkeywords from searchtable group by
searchkeywords order by count desc;
On 15/11/2010, at 12:47 PM, Rick Dwyer wrote:
Hello List.
I have a sql command that counts, groups and sorts data from a table. I need
to insert the results of that sql command into different table.
My sql SELECT looks like this:
select count(*) as count, searchkeywords from
On Nov 14, 2010, at 8:15 PM, Simon J Welsh wrote:
On 15/11/2010, at 12:47 PM, Rick Dwyer wrote:
Hello List.
I have a sql command that counts, groups and sorts data from a
table. I need to insert the results of that sql command into
different table.
My sql SELECT looks like this:
I am writing a string parsing function.
I need to return 3 values from a function:
return $string_to_display;
return $string_to_parse;
return $continue_parsing;
I am not sure how to retrieve these variables.
The Verse of the Day
“Encouragement from God’s Word”
I am writing a custom function and I need to be able to retrieve 3 values from
it.
string_parse_tool ( $string_to_parse )
The 3 variables I need to retrieve from the function are:
$string_to_parse
$string_to_display
$continue_parsing
I only know how to retrieve 1 variable from a function, not
Hi:
return array(
'string_to_display' = $string_to_display,
.
);
Best regards
惠新宸 Xinchen Hui
http://www.laruence.com/
On 2010/11/15 11:10, Ron Piggott wrote:
I am writing a string parsing function.
I need to return 3 values from a function:
return
On Sun, Nov 14, 2010 at 10:12 PM, Ron Piggott
ron.pigg...@actsministries.org wrote:
I am writing a custom function and I need to be able to retrieve 3 values
from it.
string_parse_tool ( $string_to_parse )
The 3 variables I need to retrieve from the function are:
$string_to_parse
On Nov 14, 2010, at 9:12 PM, Ron Piggott wrote:
I am writing a custom function and I need to be able to retrieve 3
values from it.
To return multiple values, you have to return an array:
return array($var1, $var2, $var3);
Then at the calling site, you retrieve them with a list
On Nov 14, 2010, at 4:48 PM, Ron Piggott wrote:
Warning: strpos() [function.strpos]: Offset not contained in string
Shouldn't you check the length of the string before giving it the
offset?
From: a...@ashleysheridan.co.uk
$pos = (strpos(' ', $string, 76))?strpos(' ',$string,
14 matches
Mail list logo