Re: [PHP] str_replace around a character??

2011-07-13 Thread Jay Ess
On 2011-07-13 10:36, Vitalii Demianets wrote: On Wednesday 13 July 2011 11:09:45 Jay Ess wrote: On 2011-07-13 09:54, Karl DeSaulniers wrote: $cc = "ema...@domain.com ,ema...@doamin.com,ema...@domain.com , ema...@domain.com, " $cc = trim($cc,","); $result = preg_repla

Re: [PHP] str_replace around a character??

2011-07-13 Thread Jay Ess
On 2011-07-13 09:54, Karl DeSaulniers wrote: $cc = "ema...@domain.com ,ema...@doamin.com,ema...@domain.com , ema...@domain.com, " $cc = trim($cc,","); $result = preg_replace('/(\s?)(,)(\s?)/i', ',', $cc); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] What am I missing here?

2010-06-28 Thread Jay Ess
Rick Dwyer wrote: Hello List. I am completely at a loss for why the line of code below returns the desired value: $PATH_INFO= substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRI PT_NAME']), strlen($_SERVER['REQUEST_URI'])); BUT, putting the same line of code on 1 line fails to return anythi

Re: [PHP] Two color rows in table inside while iteration

2010-04-30 Thread Jay Ess
Paul M Foster wrote: +1 This thread came up before, and tedd's solution was the least complex, as far as I could tell. I shamelessly stole his code and regularly use it in my own projects. ;-} Or if one choose to use Smarty template. http://www.smarty.net/manual/en/language.function.cycle.

Re: [PHP] Structured PHP studying

2010-04-23 Thread Jay Ess
David McGlone wrote: Is there a good strategy to studying PHP? For instance, is there a way to break everything down into small managable topics? My way of learning a new language is to decide on a small project to code and then learn just that i need to do for that exact feature i imple

Re: [PHP] Question on XML/XSL/PHP/MySQL

2010-01-27 Thread Jay Ess
Ryan Park wrote: Hypothetically say that I have MySQL with petabytes of data. I want to use XSL as my template language. But in order to use XSL, I need to make XML filled with petabytes of data. This does not sound elaborate way to use XSL/XML; I would rather use PHP/MySQL/Smarty. Is there a

Re: [PHP] Wrighting to $_POST array

2009-10-12 Thread Jay Ess
hessi...@hessiess.com wrote: I have some code which will loop over the whole $_POST array, runs it through mysql_real_escape_string and then writes it all back to the array again, which seams to work. Are there any incompatibility problems or such like with writing into the $_POST or $_GET array?

Re: [Fwd: [PHP] Sessions in databases]

2009-10-09 Thread Jay Ess
Il pinguino volante wrote: (There were some erroros in the previous email, I'm sorry) Hi to all. I have to realize an authentication system for a lot of users. I heard that someone uses to store session states (?) into a database. I'd like to know how and, expecially, WHY to do it and what's