Re: [PHP] Looks like a bug with Smarty

2008-01-17 Thread clive
if ($question == 'php') domail('phplist',$question); if ($question == 'smarty') domail('smartylist',$question); Hi All, I using html_options smarty tag to output an associative array in select drop down. Here a sample associative array: array(5) { ["CN-PEK-KEJ"]=> array(1) {

[PHP] Looks like a bug with Smarty

2008-01-17 Thread GoWtHaM NaRiSiPaLli
Hi All, I using html_options smarty tag to output an associative array in select drop down. Here a sample associative array: array(5) { ["CN-PEK-KEJ"]=> array(1) { [198]=> string(7) "TechTst" } ["IE-DUB-GAS"]=> array(2) { [177]=> string(10) "store room" [39]=> st

Re: [PHP] A stupid question?

2008-01-17 Thread David Wonderly
On Fri, 2008-01-18 at 10:54 +0800, Shelley Shyan wrote: > Hi all, > > Maybe this is a somehow stupid question. > > I want to know how php could know whether session_start() has been called, > that is, whether session has been started. > > I Googled, but got little help. > > Thank you for help

Re: [PHP] Foreach

2008-01-17 Thread Nathan Nobbe
On Jan 17, 2008 11:40 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > Pastor Steve wrote: > > Here is my code: > > > > $name = $_POST['name']; > > if ($name) { > > foreach ($name as $t) { > > > > echo "$t"; > > } > > > > $order = $_POST['order']; > > if ($order) { > > foreac

Re: [PHP] Foreach

2008-01-17 Thread Jim Lucas
Pastor Steve wrote: Here is my code: $name = $_POST['name']; if ($name) { foreach ($name as $t) { echo "$t"; } $order = $_POST['order']; if ($order) { foreach ($order as $i) { //Update the table in MySQL $update_data = "UPDA

Re: [PHP] Foreach

2008-01-17 Thread David Giragosian
On 1/17/08, mike <[EMAIL PROTECTED]> wrote: > On 1/17/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > > > $name = $_POST['name']; > > > if ($name) { > > > foreach ($name as $t) { > > > > > >echo "$t"; > > >} > > > >$order = $_POST['order']; > > >if ($order) { > > >foreac

Re: [PHP] A stupid question?

2008-01-17 Thread Jim Lucas
Shelley Shyan wrote: Hi all, Maybe this is a somehow stupid question. I want to know how php could know whether session_start() has been called, that is, whether session has been started. I Googled, but got little help. Thank you for help! Any tip is greatly appreciated. Regards, Shelley

[PHP] A stupid question?

2008-01-17 Thread Shelley Shyan
Hi all, Maybe this is a somehow stupid question. I want to know how php could know whether session_start() has been called, that is, whether session has been started. I Googled, but got little help. Thank you for help! Any tip is greatly appreciated. Regards, Shelley

Re: [PHP] Function-return-array idea

2008-01-17 Thread Jim Lucas
Jim Lucas wrote: I think this would be an easier/quicker fix for you then requesting that the PHP developers re-write a large portion of the way PHP currently works. Here is the reference that I have been looking for. http://en.wikipedia.org/wiki/Message_passing Jim -- PHP General Mailing

[PHP] Re: system command runs application, but application doesn't work correctly

2008-01-17 Thread Apple7777
Richard Lynch l-i-e.com> writes: > > Try writing a 2-line .sh (shell) script that does what you want, and > call that 2-liner from exec(). Thanks for idea, Richard. But it doesn't work. I wrote code as you said: $first = "/usr/local/bin/mencoder -vf scale=448:-3,expand=4

Re: [PHP] Foreach

2008-01-17 Thread mike
On 1/17/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > $name = $_POST['name']; > > if ($name) { > > foreach ($name as $t) { > > > >echo "$t"; > >} > >$order = $_POST['order']; > >if ($order) { > >foreach ($order as $i) { > > there are a few different issues here; firs

Re: [PHP] Foreach

2008-01-17 Thread Eric Butera
On Jan 17, 2008 5:57 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > there are a few different issues here; first of all; are you sure > $_POST['name'] > and $_POST['order'] are even arrays? To check try this right above your saving code block: echo ''; print_r($_POST); After you figure out if you

Re: [PHP] Foreach

2008-01-17 Thread Nathan Nobbe
On Jan 17, 2008 5:49 PM, Pastor Steve <[EMAIL PROTECTED]> wrote: > Here is my code: > > $name = $_POST['name']; > if ($name) { > foreach ($name as $t) { > >echo "$t"; >} > >$order = $_POST['order']; >if ($order) { >foreach ($order as $i) { > > >//Update the t

[PHP] Foreach

2008-01-17 Thread Pastor Steve
Here is my code: $name = $_POST['name']; if ($name) { foreach ($name as $t) { echo "$t"; } $order = $_POST['order']; if ($order) { foreach ($order as $i) { //Update the table in MySQL $update_data = "UPDATE sections SET `order` =

Re: [PHP] Function-return-array idea

2008-01-17 Thread Nathan Nobbe
On Jan 16, 2008 6:32 PM, Stijn Leenknegt <[EMAIL PROTECTED]> wrote: > Hello > > I've an idea for PHP6. Let's kickoff with an example. > > $info = getUserInformation($id); //return an array with all the > information > of an user. > echo $info['naam']; > ?> > > This is nice, but when I want one el

Re: [PHP] Function-return-array idea

2008-01-17 Thread Eric Butera
On Jan 16, 2008 6:32 PM, Stijn Leenknegt <[EMAIL PROTECTED]> wrote: > Hello > > I've an idea for PHP6. Let's kickoff with an example. > > $info = getUserInformation($id); //return an array with all the information > of an user. > echo $info['naam']; > ?> > > This is nice, but when I want one eleme

Re: [PHP] SMTP vs mail()

2008-01-17 Thread Manuel Lemos
Hello, on 01/17/2008 06:57 PM Richard Lynch said the following: > On Thu, January 17, 2008 3:50 am, Richard Heyes wrote: >>> You can easily make a mail queue in php yourself with a daemon that >>> checks the queue and sends waiting mail in batches of say 200 per >>> minute. (provided you have acce

Re: [PHP] Re: system command runs application, but application doesn't work correctly

2008-01-17 Thread Richard Lynch
Try writing a 2-line .sh (shell) script that does what you want, and call that 2-liner from exec(). On Thu, January 17, 2008 6:46 am, Apple wrote: > Daniel Brown gmail.com> writes: > >> Try replacing system() with die() and letting it print out the >> information full command string. Tha

Re: [PHP] snmp_set_valueretrieval depends on what?

2008-01-17 Thread Richard Lynch
fumble-fingers! http://lxr.php.net/ On Wed, January 16, 2008 9:18 pm, Dotan Cohen wrote: > On 16/01/2008, Richard Lynch <[EMAIL PROTECTED]> wrote: >> You can check at http://xlr.php.net but I suspect that it's too >> "new" >> to be in your version of PHP. >> >> You are on 5.2.1 and php.net is off

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-17 Thread Daniel Brown
On Jan 17, 2008 4:01 PM, Richard Lynch <[EMAIL PROTECTED]> wrote: > And I don't recall the answer, and don't give a [bleep] since it's > almost never the bottleneck in an application in the first place... You swore. I'm tellin' Mom. -- Daniel P. Brown Senior Unix Geek and #1 Rated "Year's

Re: [PHP] PHP array entries max limit

2008-01-17 Thread Richard Lynch
On Wed, January 16, 2008 11:02 pm, Prabath Kumarasinghe wrote: > I would like to know how many entries does PHP associative array can > handle. As far as I know, the answer is: How much RAM do you have? -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some i

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-17 Thread Richard Lynch
On Thu, January 17, 2008 2:06 am, Jochem Maas wrote: > Richard Lynch schreef: >> On Wed, January 16, 2008 9:57 am, Daniel Brown wrote: >>> echo($h."\n".$i."\n"); // echo is a construct, but as expected, can >>> use parentheses() >> >> Just to be picuyane: >> >> echo isn't using the parens. >> >> Th

Re: [PHP] SMTP vs mail()

2008-01-17 Thread Richard Lynch
On Thu, January 17, 2008 3:50 am, Richard Heyes wrote: >> You can easily make a mail queue in php yourself with a daemon that >> checks the queue and sends waiting mail in batches of say 200 per >> minute. (provided you have access to the cli on the server) > > Why when there MTAs? Your shared hos

Re: [PHP] Count

2008-01-17 Thread Mike Smith
Steve, Check out the while loop (http://us.php.net/manual/en/control-structures.while.php). It'll do what you need. -- Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Count

2008-01-17 Thread Pastor Steve
Richard, Thank you so much for your response. The select would be created from the number of records in the db. $variable2 The problem that I am having is rather than getting just the number of records, which is 3 currently, I would like it to be 1 for the first option, 2 for the second..., so

Re: [PHP] changing the ini from a file

2008-01-17 Thread Dan
""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Jan 16, 2008 12:02 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: Jim Lucas wrote: > Wolf wrote: >> I'm using .htaccess to do >> php_value auto_prepend_file "auth.php" >> >> The problem is that there are very specific fil

Re: [PHP] Count

2008-01-17 Thread Richard Heyes
I am wanting to create an select menu for displaying the order of the item on a page. I am guessing that I need to get the count of how many items are in the db and them put them into a select menu. Your question doesn't really make a great deal of sense. Your SQL could be: SELECT COUNT(*) FROM

[PHP] Count

2008-01-17 Thread Pastor Steve
Greetings, I am wanting to create an select menu for displaying the order of the item on a page. I am guessing that I need to get the count of how many items are in the db and them put them into a select menu. Does anyone know how to do this or can point me in the right direction? I hope this ma

[PHP] Re: How to take video embed codes and change all their widths/heights?

2008-01-17 Thread Dan
"Rob Gould" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Can anytime give me some insights on how to write a PHP script that could accept any of the below strings below and edit the strings to change their width and height settings dynamically? For instance, if I want all embe

Re: [PHP] Encryption failing

2008-01-17 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
(forgot to copy the list) On Jan 16, 2008, at 5:08 PM, Richard Lynch wrote: Is it possible that 4% of the time, you have spaces on the start/end of the string, which get trimmed before encryption? In this case, no. In trying to simplify the situation to narrow the possibilities of error,

Re: [PHP] Hashes and character encodings

2008-01-17 Thread Per Jessen
Naz Gassiep wrote: > When passing strings to md5() or sha1() do the strings get coerced to > utf8 for hashing, or does that not matter? No and no. > Does anyone have a URL that comprehensively deals with this issue? There is no issue. /Per Jessen, Zürich -- PHP General Mailing List (http:

Re: [PHP] Re: Match anything between two " that is not a " exceptifitisescaped...

2008-01-17 Thread Jochem Maas
mathieu leddet schreef: Yes Jochem, I *now* know what "lookbehind" and "lookahead" assertions are. I think I am *now* able to use them when needed. yeah! (give a man a fish he eats for a day, teach him how to fish and he'll eat forever - or until he empties the north sea [in the case of dutc

Re: [PHP] Re: Match anything between two " that is not a " exceptif it is escaped...

2008-01-17 Thread Jim Lucas
Per Jessen wrote: Max Antonov wrote: (what mean abbreviation OP? can send direcly to my mailbox) Original Poster. /Per Jessen, Zürich Thats what it means? I assumed it meant "Operator". Oh well -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some

[PHP] Hashes and character encodings

2008-01-17 Thread Naz Gassiep
When passing strings to md5() or sha1() do the strings get coerced to utf8 for hashing, or does that not matter? Does anyone have a URL that comprehensively deals with this issue? - Naz. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: Match anything between two " that is not a " exceptifitisescaped...

2008-01-17 Thread mathieu leddet
Yes Jochem, I *now* know what "lookbehind" and "lookahead" assertions are. I think I am *now* able to use them when needed. Max, thanks for the link. -- Mathieu || _| |_ / \ | | | | | | | | | | | | |__| ;) -Message d'origine- De :

Re: [PHP] Re: Match anything between two " that is not a " exceptifitis escaped...

2008-01-17 Thread Max Antonov
Jochem Maas : mathieu leddet schreef: Thanks a lot Max (and Jochem), you solved my issue. PS - you solved the issue but did you learn what a [negative] look behind assertion is? Mathieu, I agree with Jochem. If you periodicaly solve issues, such this - you must know about behind assertions

Re: [PHP] Re: Match anything between two " that is not a " exceptifit is escaped...

2008-01-17 Thread Jochem Maas
mathieu leddet schreef: Thanks a lot Max (and Jochem), you solved my issue. Cheers from Bordeaux in France ! send us a bottle of your finest ;-) PS - you solved the issue but did you learn what a [negative] look behind assertion is? I didn't give you the regexp in the hope you'd be able to f

[PHP] Re: system command runs application, but application doesn't work correctly

2008-01-17 Thread Apple7777
Daniel Brown gmail.com> writes: > Try replacing system() with die() and letting it print out the > information full command string. That may give you an idea of a > variable that's either incorrect or undefined. If you copy and paste > it and run the command from the command line and it wor

RE: [PHP] Re: Match anything between two " that is not a " exceptifit is escaped...

2008-01-17 Thread mathieu leddet
Thanks a lot Max (and Jochem), you solved my issue. Cheers from Bordeaux in France ! -- Mathieu, learning everyday. -Message d'origine- De : Max Antonov [mailto:[EMAIL PROTECTED] Envoyé : Thursday, January 17, 2008 12:36 PM À : php-general@lists.php.net Objet : Re: [PHP] Re: Match anyth

Re: [PHP] Re: Match anything between two " that is not a " exceptif it is escaped...

2008-01-17 Thread Per Jessen
Max Antonov wrote: > (what mean abbreviation OP? can send direcly to my mailbox) Original Poster. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Match anything between two " that is not a " exceptif it is escaped...

2008-01-17 Thread Max Antonov
Jochem Maas writes: attend? don't understand what you mean BUT you have given the OP the answer by changing his regexp to include a [negative] look behind assertion for the backslash. :-) I hope, my regular expression answer the purpose, than need Mathieu (what mean abbreviation OP? can send

Re: [PHP] Re: Match anything between two " that is not a " except if it is escaped...

2008-01-17 Thread Jochem Maas
Max Antonov schreef: mathieu leddet writes: Hi everyone, I am struggling with regular expression trying to match strings delimited by double quotes, but taking into consideration that \" is not a string ending character. .. // pattern for catching strings between " $pattern = '#"([^"]*)"

[PHP] Re: Match anything between two " that is not a " except if it is escaped...

2008-01-17 Thread Max Antonov
mathieu leddet writes: Hi everyone, I am struggling with regular expression trying to match strings delimited by double quotes, but taking into consideration that \" is not a string ending character. .. // pattern for catching strings between " $pattern = '#"([^"]*)"#'; . $out conta

Re: [PHP] SMTP vs mail()

2008-01-17 Thread Richard Heyes
You can easily make a mail queue in php yourself with a daemon that checks the queue and sends waiting mail in batches of say 200 per minute. (provided you have access to the cli on the server) Why when there MTAs? -- Richard Heyes http://www.websupportsolutions.co.uk Mailing list management

Re: [PHP] Match anything between two " that is not a " except if it is escaped...

2008-01-17 Thread Jochem Maas
mathieu leddet schreef: Hi everyone, I am struggling with regular expression trying to match strings delimited by double quotes, but taking into consideration that \" is not a string ending character. STFW for the concept "look behind assertion" - that is what you need to differentiate between

[PHP] Match anything between two " that is not a " except if it is escaped...

2008-01-17 Thread mathieu leddet
Hi everyone, I am struggling with regular expression trying to match strings delimited by double quotes, but taking into consideration that \" is not a string ending character. ---8<--- - $in = 'this is a string : "Hi everyone my na

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-17 Thread Jochem Maas
Richard Lynch schreef: On Wed, January 16, 2008 9:57 am, Daniel Brown wrote: echo($h."\n".$i."\n"); // echo is a construct, but as expected, can use parentheses() Just to be picuyane: echo isn't using the parens. The parens are forcing PHP to evaluate the concatenation of the strings FIRST,

Re: [PHP] PHP array entries max limit

2008-01-17 Thread Per Jessen
Prabath Kumarasinghe wrote: > Hi All > > I would like to know how many entries does PHP associative array can > handle. Why don't you just test it? for( $i=0; ; $i++ ) { $kk[$i]=1; } Attempt#1 - 13 keys, stopped due to memory limit *M. Attempt#2 - 838 keys, memlimit 512M. Attem