[PHP] Re: String is not zero-terminated in zend_execute_API.c

2011-10-21 Thread Carlos Medina
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 ú}

[PHP] Re: String Encodings - loose guidelines

2011-01-26 Thread Shawn McKenzie
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

Re: [PHP] Re: String manipulation

2010-11-14 Thread Tamara Temple
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

Re: [PHP] Re: String manipulation

2010-11-14 Thread Ron Piggott
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,

Re: [PHP] Re: String manipulation

2010-11-14 Thread D. Dante Lorenso
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

Re: [PHP] Re: String manipulation

2010-11-14 Thread a...@ashleysheridan.co.uk
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

[PHP] Re: String manipulation

2010-11-14 Thread 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 , 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

Re: [PHP] Re: string as file

2007-08-10 Thread Richard Lynch
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

[PHP] Re: string as file

2007-08-10 Thread Dan
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]>

[PHP] Re: string problem

2006-07-10 Thread Rafael
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

Re: [PHP] Re: String /pattern formatting extraction question

2006-04-10 Thread Robin Vickery
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, $

Re: [PHP] Re: String /pattern formatting extraction question

2006-04-10 Thread Andy
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

[PHP] Re: String /pattern formatting extraction question

2006-04-10 Thread Barry
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

[PHP] Re: string to integer conversion

2006-03-15 Thread João Cândido de Souza Neto
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 >

[PHP] Re: string size in bytes

2006-02-12 Thread Eli
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

[PHP] Re: string lenght?

2006-02-12 Thread Eli
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

[PHP] Re: string lenght?

2006-02-06 Thread Barry
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

[PHP] Re: string to .ZIP | sending report by email

2005-08-23 Thread Manuel Lemos
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

Re: [PHP] Re: string highlight

2005-06-08 Thread John Nichel
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

Re: [PHP] Re: string highlight

2005-06-08 Thread Rory Browne
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

Re: [PHP] Re: string highlight

2005-06-08 Thread John Nichel
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

Re: [PHP] Re: string highlight

2005-06-08 Thread Rory Browne
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

RE: [PHP] Re: string highlight

2005-06-08 Thread Jay Blanchard
[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

Re: [PHP] Re: string highlight

2005-06-08 Thread Jochem Maas
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

Re: [PHP] Re: string highlight

2005-06-08 Thread Jochem Maas
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

Re: [PHP] Re: string highlight

2005-06-08 Thread Rory Browne
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

Re: [PHP] Re: string highlight

2005-06-08 Thread John Nichel
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

Re: [PHP] Re: string highlight

2005-06-07 Thread Rory Browne
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

[PHP] Re: string highlight

2005-06-07 Thread David Duong
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

[PHP] Re: string highlight

2005-06-07 Thread David Duong
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.

[PHP] Re: String to Date and Date to String Functions?

2005-01-24 Thread David Robley
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

[PHP] Re: string filtering

2004-07-21 Thread Mr. Bogomil Shopov
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, -,./?

[PHP] Re: string

2004-07-05 Thread water_foul
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

[PHP] Re: string

2004-07-05 Thread water_foul
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

[PHP] Re: string replace in files

2004-04-30 Thread Justin Patrin
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

Re: [PHP] Re: string function that inserts a char

2004-03-20 Thread Five
"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

Re: [PHP] Re: string function that inserts a char

2004-03-20 Thread Jason Giangrande
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,

[PHP] Re: string function that inserts a char

2004-03-20 Thread Five
"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

Re: [PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Robert Cummings
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. -- .---

[PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Al
>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

[PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Terence
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

[PHP] Re: String matching for sample code doesn't work....

2003-11-19 Thread Scott Fletcher
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

[PHP] Re: String to Array or Hash Table

2003-10-20 Thread Manuel Vázquez Acosta
Try: parse_str($theStr, $assocArray); Manu. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: String formatting function - First char Upper, rest lower

2003-09-06 Thread Thomas Hebinck
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 (

[PHP] Re: string concatenation from array

2003-08-14 Thread Micah Montoy
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

[PHP] Re: string concatenation from array

2003-08-14 Thread Fabio Rotondo
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

[PHP] Re: string validating

2003-03-12 Thread Brad Esclavon
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

[PHP] Re: string

2002-11-29 Thread Kyle Gibson
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

[PHP] Re: String manipulation

2002-10-24 Thread Erwin
"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

[PHP] Re: String extraction from blobs. Extracted string to be placedinto field within another table.

2002-10-20 Thread Manuel Lemos
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

[PHP] Re: string...

2002-04-12 Thread Michael Virnstein
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

[PHP] Re: string...

2002-04-12 Thread Michael Virnstein
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

[PHP] Re: String termination with \0 ?

2002-04-11 Thread David Robley
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

[PHP] Re: string reverse ??

2002-04-09 Thread Yuri Petro
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

[PHP] RE: string conversion

2001-09-21 Thread saif
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

[PHP] Re: String Comparison

2001-07-25 Thread Adrian Ciutureanu
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

[PHP] Re: string search

2001-07-16 Thread CC Zona
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

RE: [PHP] RE: string search

2001-07-16 Thread scott [gts]
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

Re: [PHP] RE: string search

2001-07-16 Thread Sheridan Saint-Michel
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

RE: [PHP] RE: string search

2001-07-16 Thread scott [gts]
-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

[PHP] RE: string search

2001-07-16 Thread Joseph Bannon
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.

[PHP] Re: string search

2001-07-16 Thread Steve Brett
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

[PHP] Re: string search

2001-07-16 Thread J Smith
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

RE: [PHP] Re: string formatting help

2001-07-06 Thread Chad Day
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

[PHP] Re: string formatting help

2001-07-06 Thread Steve Edberg
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

[PHP] Re: string formatting help

2001-07-06 Thread Inércia Sensorial
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