Am 21.10.2011 08:49, schrieb Daniel Betz:
> Hello List,
>
> i am running PHP 5.3.8-FPM (with ondemand patch) in debug mode and got this
> error every time I post an reply in vBulletin Board:
>
> Warnung: String is not zero-terminated
> (Z.ý4 ý4 ú}
On 01/25/2011 02:36 PM, Donovan Brooke wrote:
> Hello,
>
> I don't yet have a complete understanding of string encodings for the
> various environments they may need to pass through or be in. I have
> found bits and pieces within Larry's book, the online docs, and by
> googling... and
> my app see
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,
76):str
php.net
Subject: Re: [PHP] Re: String manipulation
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"
Date: Sun, Nov 14,
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 or, 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 charac
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"
Date: Sun, Nov 14, 2010 20:48
Subject: [PHP] Re: String manipulati
How would I write an IF statement that looks for the first space space (“ “)
left of the 76th character in a string or , 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 Ve
Reading that, I think it's similar to this:
http://php.net/stream
I'm really not sure what the OP wants, though...
On Thu, August 9, 2007 6:32 pm, Dan wrote:
> Well, I have no idea what the Phython StringIO method does. Could
> someone
> explain in PHP terms maybe? Google gave me this explain
Well, I have no idea what the Phython StringIO method does. Could someone
explain in PHP terms maybe? Google gave me this explaining stringIO
http://docs.python.org/lib/module-StringIO.html . It didnt' make much sense
still after reading it though.
- Dan
"Rick Pasotto" <[EMAIL PROTECTED]>
Well, if that's the pattern, you can search for >'%< and return
anything between this and >%'<; if you can use PCRE try something like
if ( preg_match('/'%(.+?)%'/X', $str, $matches) ) {
echo $matches[1];
}
Now, if the expression can only have: upper-case letters, numbers & "-",
then
On 10/04/06, Andy <[EMAIL PROTECTED]> wrote:
> >> text1 /ptext2 /otext3
> > Does it always look like that?
> > text1(whitespace)/ptext2(whitespace)/otext3
>
> The ideea is to extract the texts before and between /o and /p.
> $html = "asdäüü ö ö vf /pxtestxx/ostestss";
> eregi("^([^/.*]*)", $html, $
Regards,
Andy.
- Original Message -
From: "Barry" <[EMAIL PROTECTED]>
To:
Sent: Monday, April 10, 2006 4:22 PM
Subject: [PHP] Re: String /pattern formatting extraction question
Andy wrote:
Hi to all, I have the following pattern for a string:
text1 /ptext2 /otext3
Does it al
Andy wrote:
Hi to all,
I have the following pattern for a string:
text1 /ptext2 /otext3
Does it always look like that?
text1(whitespace)/ptext2(whitespace)/otext3
Then use explode to create an array from it
explode (" ",$stringpattern);
Now, I want to extract the text by "patterns" from th
Try this:
$accno="2927";
$accno=substr("",0,(8-strlen($accno+1))).($accno+1);
I don't test, but i hope it'll work fine.
suresh kumar wrote:
> i am facing one problem in type casting.
> $accno="2927";
> $accno=$accno+1;
> its o/p is 2928. but i want output to be 2928.i am
>
benifactor wrote:
also i need to know how to find out how fast a page renders
example;
page rendered in 1.114 seconds
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
William Stokes wrote:
How can I test whether a string is 1 or 2 digits long?
You can use regular expressions:
preg_match('/^\d{1,2}$/',$str);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
William Stokes wrote:
Hello,
How can I test whether a string is 1 or 2 digits long?
Thanks
-Will
strlen() -_-
RTFM
www.php.net/strlen
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
Hello,
on 08/23/2005 02:13 PM Ing. Josué Aranda said the following:
I have a script that generate a XHTML report, but also i want to send
that report by email, the problem is the file size its up to 4Mb, its
too big to send by email (considering that some people still using
hotmail).. how i can
Rory Browne wrote:
< won't be picked up as a word boundry (\b).
Aparently it will.
I stand corrected based on these two rules for \b since < and > are
non-word characters...
# Between a word character and a non-word character following right
after the word character.
# Between a non-wor
On 6/8/05, John Nichel <[EMAIL PROTECTED]> wrote:
> Rory Browne wrote:
>
> >>Good catch Rory. A regex replace would work better here.
> >>
> >>$search = "body";
> >>$find = "/\b" . $search . "\b/";
> >>preg_replace ( $find, "" . $search . "", $html );
> >
> >
> > I don't think so. If I'm reading
Rory Browne wrote:
Good catch Rory. A regex replace would work better here.
$search = "body";
$find = "/\b" . $search . "\b/";
preg_replace ( $find, "" . $search . "", $html );
I don't think so. If I'm reading your code correctly you still have
the same problem, as I outlined above. There i
On 6/8/05, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> [snip]
> I don't think so. If I'm reading your code correctly you still have
> the same problem, as I outlined above. There is no simple solution to
> this. It either involves advanced regex(more advanced than my
> understanding of it), or a pro
[snip]
I don't think so. If I'm reading your code correctly you still have
the same problem, as I outlined above. There is no simple solution to
this. It either involves advanced regex(more advanced than my
understanding of it), or a proper parser.
[/snip]
Also it should be noted that the tag p
Rory Browne wrote:
On 6/8/05, John Nichel <[EMAIL PROTECTED]> wrote:
Rory Browne wrote:
On 6/8/05, David Duong <[EMAIL PROTECTED]> wrote:
Sebastian wrote:
i'm looking for a function that can highlight certain search terms in a
string. anyone have something already made that i can plugin
John Nichel wrote:
Rory Browne wrote:
On 6/8/05, David Duong <[EMAIL PROTECTED]> wrote:
Sebastian wrote:
i'm looking for a function that can highlight certain search terms in a
string. anyone have something already made that i can plugin to my
exisiting code?
I found a couple but they do n
On 6/8/05, John Nichel <[EMAIL PROTECTED]> wrote:
> Rory Browne wrote:
> > On 6/8/05, David Duong <[EMAIL PROTECTED]> wrote:
> >
> >>Sebastian wrote:
> >>
> >>>i'm looking for a function that can highlight certain search terms in a
> >>>string. anyone have something already made that i can plugin t
Rory Browne wrote:
On 6/8/05, David Duong <[EMAIL PROTECTED]> wrote:
Sebastian wrote:
i'm looking for a function that can highlight certain search terms in a
string. anyone have something already made that i can plugin to my
exisiting code?
I found a couple but they do not work very well.. s
On 6/8/05, David Duong <[EMAIL PROTECTED]> wrote:
> Sebastian wrote:
> > i'm looking for a function that can highlight certain search terms in a
> > string. anyone have something already made that i can plugin to my
> > exisiting code?
> >
> > I found a couple but they do not work very well.. some
David Duong wrote:
Sebastian wrote:
i'm looking for a function that can highlight certain search terms in
a string. anyone have something already made that i can plugin to my
exisiting code?
I found a couple but they do not work very well.. some break html code
if the string contains the ke
Sebastian wrote:
i'm looking for a function that can highlight certain search terms in a
string. anyone have something already made that i can plugin to my
exisiting code?
I found a couple but they do not work very well.. some break html code
if the string contains the keywords in the html.
On Tuesday 25 January 2005 03:01, Ben Edwards wrote:
> Being trying to work out haw to handle dates. Basically I need a
> function to convert a Date to a String and another function to convert
> a string to a date.
>
> Exactly what format the date is held in is not relevant as long as it
> is so
Hello
http://bg2.php.net/manual/en/function.preg-match.php
Regards
Bogomil
http://spisanie.com/indexen.php - WebDevMagazine
C.F. Scheidecker Antunes wrote:
Hello all,
I need to filter some strings. They can only contain characters like
a...z or A..Z and 0..9. Some strings have blank spaces, -,./?
from help me with eregi:
sorry i didn't relise i did that till just now
"Richard Davey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> w> ho do you make a eregi so it looks at the var as a single line
>
> If anyone helps you after you posted 15KB of pointless HTML.. twice..
> I'll
oh 1 more thing.. i am looking for:
but in the html it shows up as:
-
"Water_foul" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> ok i've stripped some html from a page and my eregi didn't work, so i
> put it into a text box so i could see what the variabl
Steve Buehler wrote:
I am trying to write a script that will replace a string in a file.
Actually, about 3000 files. And I am stuck. I can get the list of
files, but then I pretty much become stuck. I wanted to try
str_ireplace (not sure if that is what I should use or not), but I can't
ev
"Jason Giangrande" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Five wrote:
> > "Five" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> >
> >>I just finished looking through string functions
> >>http://us2.php.net/manual/en/ref.strings.php
> >>and can't find one that
Five wrote:
"Five" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
I just finished looking through string functions
http://us2.php.net/manual/en/ref.strings.php
and can't find one that inserts a character, not replaces one.
If there's a string that's over 50 chars long without a space,
"Five" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I just finished looking through string functions
> http://us2.php.net/manual/en/ref.strings.php
> and can't find one that inserts a character, not replaces one.
>
> If there's a string that's over 50 chars long without a space, I
On Sun, 2003-11-23 at 20:02, Al wrote:
> >From the PHP Manual notes (http://us2.php.net/manual/en/function.chop.php):
>
> $string = substr("$string", 0, -1);
You'd be better off with:
$string = substr( $string, 0, -1 );
to avoid unnecessary interpolation overhead.
Cheers,
Rob.
--
.---
>From the PHP Manual notes (http://us2.php.net/manual/en/function.chop.php):
$string = substr("$string", 0, -1);
Al
"Jed R. Brubaker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Does PHP have an equivalent to PERL's chop - that is, a way to get rid of
> the last character in a
Jed R. Brubaker wrote:
Does PHP have an equivalent to PERL's chop - that is, a way to get rid of
the last character in a string?
"Hello World" to "Hello Worl"
Thanks in advance.
this might work, haven't tested it...
second param is optional
function chop($strSubject, $intWastage = 1) {
$strRes
Never mind that! It work now Been working on it for a few hours
though
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Everyone!
>
> I'm not really sure why does this simple script not work. When I run
> the code, the loop kept going until it timed
Try:
parse_str($theStr, $assocArray);
Manu.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
>Does anyone know of a function or script that will capitalize the first
char
>and lowercase the remaining chars of each word in a string?
from the documentation:
$bar = ucwords(strtolower($bar));
http://de.php.net/manual/en/function.ucwords.php
Bye,
Thomas.
--
PHP General Mailing List (
Thanks a bunch. Problem solved.
"Micah Montoy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm having a bit of difficulty getting a string to attach to itself from
an
> array. Here is the bit of code I'm working on.
>
> $wresult = "";
>
> foreach ($search_string as $word_resu
Micah Montoy wrote:
I'm having a bit of difficulty getting a string to attach to itself from an
array. Here is the bit of code I'm working on.
$wresult = "";
foreach ($search_string as $word_result){
$wresult = $wresult & " " & $word_result;
}
what about:
$wresult = join ( " ", $search_strin
trim($a_string); // removes all newline, carriage returns, and formating
$in_str_var_name=str_replace("search_for", "replace_with",
$in_str_var_name);
replaces any strings or chars
also- check out php.net documentation on string-- many other useful
functions for string manipulation
--
PHP
hi everyone..
how to get the part of string and make it into a variable..
sample :
"determine"
now, i want to take just "mine" or 4 word from right, or "deter" (for
left function).
and after i got it, i want to make the "mine" into $x variable
my mind..
$x = "mean"
help please...
$x = subst
"Francisco Vaucher" <[EMAIL PROTECTED]> wrote in message
news:3B966ABC166BAF47ACBF4639003B11AC848AE7@;exchange.adtarg.com...
>
> Hi to all (again ;-)
>
> I need one or more PHP functions to handle a form input.
>
> i.e. you write: [EMAIL PROTECTED]
>
> I have to check that after the '@' comes 'tes
Hello,
On 10/19/2002 11:13 PM, Dwalker wrote:
What is the most effective method of extracting from a blob specified
text to be placed into another table field.
If you use Metabase it allows you to create prepared queries where you
can pipe data from blob returned by a select query to a blob to
beware if you're using preg_match instead.
regex using preg_match have to be enclosed by /
so the same with preg_match would look like:
preg_match("/^.*_[0-9]{4}\.jpg$/i", $file_name)
and using preg_match meens that / is a special character and has to be
backslashed if
wanted by it's meening. and
wrong again:
eregi("^/*_[0-9]{4}\.jpg$", $file_name)
now yo say, / at the beginning between 0 and unlimited times, the rest is
ok.
try this, i rechecked my second example and saw that i did a \. at the
beginning. this was wrong,
because it'll search for a dot at the beginning. simply forget abou
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> Hi All,
>
> I have the following question. I have been developing with C for a
> while and I was used that the \0 indicated the end of a string. So if
> I had a variable containing 1234\056789 and the variable was printed,
> only 1234 w
strrev -- Reverse a string
http://www.php.net/manual/en/function.strrev.php
--
Kind regards,
Yuri.
www.AceHoster.com Quality web hosting
"Scott Fletcher" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:[EMAIL PROTECTED]...
> Hi!
>
> Is there a PHP code or function
correct way is to get file name is :
$path_parts = pathinfo($dir.$file);
$fdir = $path_parts["dirname"]; // directory name
$fname = $path_parts["basename"]; // file name
$ftext = $path_parts["extension"]; // file extension
best regard
Note that using strings without quotes generates a warning that is not
displayed in the default configuration of PHP. The message looks like
"Warning: Use of undefined constant anyString - assumed 'anyString' in
test.php on line 3"
(line 3: echo anyString;)
If you want to see these warnings, set
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (J Smith) wrote:
> > I need a search function (if statement) that performs a search on a string
> > and if the string contains something like "aol.com", performs another
> > function. Can anyone help me? Thanks.
> >
> > Joseph
> >
>
> Try rese
aracter by character, C-style. :-)
> -Original Message-
> From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] RE: string search
>
> Couldn't he just do something like
>
> if (strstr($text, "aol.com")) {
>MyFunction();
&g
PROTECTED]>
To: php <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 10:59 AM
Subject: RE: [PHP] RE: string search
> read the docs for ereg... i hardly use it, so i dont know
> for certain if it will match. (althouth the use of "^" at
> beginning *and* end suggests that
-Original Message-
> From: Joseph Bannon [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 16, 2001 11:49 AM
> To: PHP (E-mail)
> Subject: [PHP] RE: string search
>
>
> Will this work?
>
> $string = "http://www.aol.com/";;
>
> if (ereg ("^ao
Will this work?
$string = "http://www.aol.com/";;
if (ereg ("^aol.com^", $string) {
}
else {
}
> I need a search function (if statement) that performs a search on a string
> and if the string contains something like "aol.com", performs another
> function. Can anyone help me? Thanks.
have a look at ereg() (regular expression match) functions in manual.
they'll do exactly what you want.
Steve
"Joseph Bannon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I need a search function (if statement) that performs a search on a string
> and if t
Joseph Bannon wrote:
> I need a search function (if statement) that performs a search on a string
> and if the string contains something like "aol.com", performs another
> function. Can anyone help me? Thanks.
>
> Joseph
>
Try researching regular expressions. In PHP, look at the preg and ereg
9 PM
To: Chad Day; [EMAIL PROTECTED]
Subject: [PHP] Re: string formatting help
In the original message below, did you mean that you're actually
SEEING the tags in the output? If so, there may be a conversion
with htmlentities() going on somewhere that converts the tags to
<br> (so they are di
In the original message below, did you mean that you're actually
SEEING the tags in the output? If so, there may be a conversion
with htmlentities() going on somewhere that converts the tags to
(so they are displayed instead of being interpreted).
If you replaced the 's with spaces or newl
Maybe:
$array = explode("", $string);
foreach ($array as $key => $value) {
echo "$value";
}
Would separate the string by 's and print all in one line.
--
Julio Nobrega.
A hora está chegando:
http://sourceforge.net/projects/toca
"Chad Day" <[EMAIL PROTECTED]> wrote in message
[EM
66 matches
Mail list logo