On 8/7/07, Richard Lynch [EMAIL PROTECTED] wrote:
preg_match('|^(.*)\\((.*)\\)$', $string, $parts);
Lynch, he asked how to manipulate a string, not for you to draw
him an ASCII topless dancer. ;-P
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
Hey,
On Aug 8, 2007, at 8:54 AM, Daniel Brown wrote:
On 8/7/07, Richard Lynch [EMAIL PROTECTED] wrote:
preg_match('|^(.*)\\((.*)\\)$', $string, $parts);
Lynch, he asked how to manipulate a string, not for you to draw
him an ASCII topless dancer. ;-P
Pregnant too none the less.
On Wed, August 8, 2007 7:54 am, Daniel Brown wrote:
On 8/7/07, Richard Lynch [EMAIL PROTECTED] wrote:
preg_match('|^(.*)\\((.*)\\)$', $string, $parts);
Lynch, he asked how to manipulate a string, not for you to draw
him an ASCII topless dancer. ;-P
Yeah, and I think I left out a
On Thu, August 2, 2007 9:43 am, Don Don wrote:
hi all, am trying to cut some texts from a serries of string values
e.g.
this is how we do (50 cents feat. the game)
give it to me (nelly feat timerland)
let me hold you (bow wow feat omarion)
i want to cut off the text between the comas and
hi all, am trying to cut some texts from a serries of string values e.g.
this is how we do (50 cents feat. the game)
give it to me (nelly feat timerland)
let me hold you (bow wow feat omarion)
i want to cut off the text between the comas and i've seen some examples
?
$string = Hello world,
[snip]
hi all, am trying to cut some texts from a serries of string values e.g.
this is how we do (50 cents feat. the game)
give it to me (nelly feat timerland)
let me hold you (bow wow feat omarion)
i want to cut off the text between the comas and i've seen some examples
[/snip]
Comas? Do you
Maybe I'm blind, but I don't see any commas in the text you are referring
to.
On 8/2/07, Don Don [EMAIL PROTECTED] wrote:
hi all, am trying to cut some texts from a serries of string values e.g.
this is how we do (50 cents feat. the game)
give it to me (nelly feat timerland)
let me hold
On 8/2/07, Dan Shirah [EMAIL PROTECTED] wrote:
Maybe I'm blind, but I don't see any commas in the text you are referring
to.
On 8/2/07, Don Don [EMAIL PROTECTED] wrote:
hi all, am trying to cut some texts from a serries of string values e.g.
this is how we do (50 cents feat. the game)
At 11:07 AM -0400 8/2/07, Daniel Brown wrote:
To remove the text between the comas would be a great feat,
especially if you're still groggy from waking up from the first one.
LOL!
Thanks for the code. Next time I have a coma, I'll use it.
Cheers,
tedd
--
---
http://sperling.com
I meant i want to get rid of the braces. e.g. get the text up to the start of
the first brace and ignore anything from the first brace onwards
Dan Shirah [EMAIL PROTECTED] wrote: Maybe I'm blind, but I don't see any
commas in the text you are referring
to.
On 8/2/07, Don Don
wrote:
hi all,
On 8/2/07, Don Don [EMAIL PROTECTED] wrote:
I meant i want to get rid of the braces. e.g. get the text up to the start of
the first brace and ignore anything from the first brace onwards
Dan Shirah [EMAIL PROTECTED] wrote: Maybe I'm blind, but I don't see any
commas in the text you are
I meant i want to get rid of the braces. e.g. get the text up to the start
of the first brace and ignore anything from the first brace onwards
I don't see any braces, either. For the record:
brace = {}
bracket = []
parentheses = ()
comma = ,
semicolon = ;
To extract the partial string leading
Hello,
I want to save a text - which is created in a selfmade javascipt editor -
into a .cnt - file with php...
It works fantastically if I work in the LAN - environment, but if I work
from outside - it's still saving, but it cuts contingent some text...!
I can't I understand why it doesn't
I've been looking on the php.net page, but I don't know what to look for..
I found string mb_strcut ( string str, int start [, int length [, string
encoding]])
and it looks like the thing I'm looking for, but I don't know how to use it
:)
can anyone tell me? :P
HÃ¥kan
--
PHP General Mailing
What exactly are you trying to do? If you tell us more, we can help better.
Chris
Hawk wrote:
I've been looking on the php.net page, but I don't know what to look for..
I found string mb_strcut ( string str, int start [, int length [, string
encoding]])
and it looks like the thing I'm looking
Lets say I have a news text, and in a menu, I just want to print the first..
lets say 30 letters, and maybe add a ... after, and link it to the full
text.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wednesday 12 June 2002 03:36, Hawk wrote:
Lets say I have a news text, and in a menu, I just want to print the
first.. lets say 30 letters, and maybe add a ... after, and link it to
the full text.
substr(), wordwrap()
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source
I'd probably use substr. For the first 30 characters plus three full
stops (untested):
$shortstring = substr($longstring,0,30);
The manual shows all the string handling functions
http://www.php.net/manual/en/ref.strings.php
Regards
Chris
Hawk wrote:
Lets say I have a news text, and in
Try (this is untested)
if (length($string) 30) {
print substr($string, 0, 30) ;
}
else {
print $string;
}
--OR-- (if you want to over-write $string)
$string = ((length($string) = 30) ? substring($string, 0, 30) :
$string );
--
Scott Hurring
Systems Programmer
EAC Corporation
19 matches
Mail list logo