Re: [PHP] preg_replace: avoiding double replacements

2010-05-17 Thread Jim Lucas
Andre Polykanine wrote: > Hello everyone, > > Sorry for bothering you again. > Today I met a problem exactly described by a developer in users' notes > that follow the preg_replace description in the manual: > info at gratisrijden dot nl > 02-Oct-2009 02:48 > if you are using the preg_replace wit

[PHP] preg_replace: avoiding double replacements

2010-05-17 Thread Andre Polykanine
Hello everyone, Sorry for bothering you again. Today I met a problem exactly described by a developer in users' notes that follow the preg_replace description in the manual: info at gratisrijden dot nl 02-Oct-2009 02:48 if you are using the preg_replace with arrays, the replacements will apply as

Re: [PHP] Simplexml_load_file: 401 Authorization Required

2010-05-17 Thread Nathan Nobbe
On Mon, May 17, 2010 at 4:01 PM, Michael Stroh wrote: > I've created a php file (getcalentries.php) that creates an xml output and > have a second page (plots_test.php) that reads in the xml file and displays > some plots. They've both in the same webdav folder so I have to enter > authentication

[PHP] Simplexml_load_file: 401 Authorization Required

2010-05-17 Thread Michael Stroh
I've created a php file (getcalentries.php) that creates an xml output and have a second page (plots_test.php) that reads in the xml file and displays some plots. They've both in the same webdav folder so I have to enter authentication information to load the plotting page, but my simplexml_load

Re: [PHP] create tree from arrays

2010-05-17 Thread David Harkness
On Mon, May 17, 2010 at 9:13 AM, Richard Quadling wrote: > OOI, can you take a look at my first response. Is this the sort of > thing you were talking about? > Essentially, yes. For the temporary array I would map nid => element instead of INDEX => nid. Your $Relationships array is basically the

Re: [PHP] create tree from arrays

2010-05-17 Thread Richard Quadling
On 17 May 2010 16:41, David Harkness wrote: > Shahrzad, > > While your algorithm is correct it is very inefficient. The full array is > scanned for every element in the array. If the array contains 1,000 > elements, 1,000,000 comparisons will be performed and mktree_array() will be > called 1,000

Re: [PHP] create tree from arrays

2010-05-17 Thread David Harkness
Shahrzad, While your algorithm is correct it is very inefficient. The full array is scanned for every element in the array. If the array contains 1,000 elements, 1,000,000 comparisons will be performed and mktree_array() will be called 1,000 times. This is known as order n squared: O(n^2) and is a

Re: [PHP] A simple question, however it's urgent

2010-05-17 Thread Al
On 5/17/2010 8:53 AM, Andre Polykanine wrote: Ash, Magic quotes are disabled: http://gviragon.org/study/php.php Any ideas? Thanks a lot! Your code should work for something as simple as this, almost regardless of the php setup. Change your $what=array("\r\n", "\n", "\r"); $with=array(""

Re: Re[4]: [PHP] A simple question, however it's urgent

2010-05-17 Thread Ashley Sheridan
On Mon, 2010-05-17 at 15:53 +0300, Andre Polykanine wrote: > Ash, > > Magic quotes are disabled: > http://gviragon.org/study/php.php > Any ideas? > Thanks a lot! > > > -- > With best regards from Ukraine, > Andre > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ > jabb

Re[4]: [PHP] A simple question, however it's urgent

2010-05-17 Thread Andre Polykanine
Ash, Magic quotes are disabled: http://gviragon.org/study/php.php Any ideas? Thanks a lot! -- With best regards from Ukraine, Andre Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - O

Re: [PHP] PHP Site with CSS and Internet Explorer

2010-05-17 Thread Juan Rodriguez Monti
2010/5/15 Jim Lucas : > Juan Rodriguez Monti wrote: >> >> I guys, >> I'm having some problems with the following. >> >> I have a PHP Site working perfectly with HTML and CSS. The CSS runs >> flawlessly in Firefox and Google Chrome. However, I'm having some >> problems with Internet Explorer. >> >>

Re: Re[2]: [PHP] A simple question, however it's urgent

2010-05-17 Thread Ashley Sheridan
On Mon, 2010-05-17 at 15:36 +0300, Andre Polykanine wrote: > Hey Ash, > > I do a print_r($_POST) and see there the \r\n's. Please don't pay > attention to question marks, there is some Cyrillic here: > > > Original POST: > > Array ( [uwork] => > asdfsadf\r\nasdfasdf\r\nasdfasdf\r\nasdfasdf\r\

Re[2]: [PHP] A simple question, however it's urgent

2010-05-17 Thread Andre Polykanine
Hey Ash, I do a print_r($_POST) and see there the \r\n's. Please don't pay attention to question marks, there is some Cyrillic here: Original POST: Array ( [uwork] => asdfsadf\r\nasdfasdf\r\nasdfasdf\r\nasdfasdf\r\nasdfasdf\r\nasdf [lid] => 23 [stud] => 1587 [sfac] => 3 [stid] => 9 [report] =

Re: [PHP] A simple question, however it's urgent

2010-05-17 Thread Ashley Sheridan
On Mon, 2010-05-17 at 15:26 +0300, Andre Polykanine wrote: > Hello everyone, > Just can't imagine what happens. There is the simplest function in the > world: > > function LineBreaks ($str) { > $what=array("\r\n", "\n", "\r"); > $with=array(""); > $str=str_replace($what, $with, $str); > return $s

[PHP] A simple question, however it's urgent

2010-05-17 Thread Andre Polykanine
Hello everyone, Just can't imagine what happens. There is the simplest function in the world: function LineBreaks ($str) { $what=array("\r\n", "\n", "\r"); $with=array(""); $str=str_replace($what, $with, $str); return $str; } And... it does work on one site and doesn't on another. Same hosting pr

Re: [PHP] Displaying errors

2010-05-17 Thread Phpster
On May 17, 2010, at 1:18 AM, Rene Veerman wrote: On Sun, May 16, 2010 at 1:39 PM, Malka Cymbalista wrote: Hi all, we are running Apache 2.2.6 and PHP 5.2.6 on a Linux machine. If someone gets an error when displaying a php web page, he does not get any error message on the screen. The