Re: [PHP] Pushing array onto array

2003-08-03 Thread Hank TT
2003 13:02, Hank TT wrote: Well, I might have been more specific about their example, since not everyone has the book. An excerpt below (so I don't need to retype all the names of characters and foul creatures from the Lord of the Rings): --- $arr1 = array('G

Re: [PHP] Clarification..... UTF-8 Enccoding .....

2003-08-03 Thread Hank TT
I don't know how MS encodes its smart quotes but there are certainly Unicode-compliant equivalents: http://www.alanwood.net/unicode/general_punctuation.html And XML is friendly to utf-8 (assuming you do want utf-8). - Original Message - From: Russell P Jones [EMAIL PROTECTED] To: [EMAIL

[PHP] Pushing array onto array

2003-08-02 Thread Hank TT
In comparing Perl's push to array_push in PHP Developer's Cookbook (2/e, p. 76), the authors note that pushing an array onto another produces a two-dimensional array. However, I have not been able to reproduce their example result, and php.net/array_push does not document this behavior. Just

Re: [PHP] Pushing array onto array

2003-08-02 Thread Hank TT
', 'O'); $arr3 = array_push($arr1, $arr2); print $arr3[3][1]; //prints Su --- Weird usage - Original Message - From: Andrew Brampton [EMAIL PROTECTED] To: Hank TT [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, August 02, 2003 2:09 PM Subject: Re: [PHP

Re: [PHP] preg_match

2003-08-02 Thread Hank TT
Either of these should work: preg_match(/\b.*\b/, trim($zutat), $matches); preg_match(/\b.+\b/, $zutat, $matches); I'll leave the why to someone else :) - Original Message - From: Michael Temeschinko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 02, 2003 7:55 PM

[PHP] retrieving multi-select form values

2003-07-30 Thread Hank TT
Given the following querystring generated by, for example, a multi-select form list (menu), the contents of $_GET['list'] is expected to be an array holding 3 elements: http://awebsite.net/formlist.php?list=2list=3list=99 Yet I only see the last value returned as a lone string. Is this

Re: [PHP] PHPSESSID AND SID

2003-07-30 Thread Hank TT
phpsessid is the default name of the session cookie sent from the browser to PHP. So it becomes part of the $_COOKIE array, which PHP automatically turns into a global variable for you. Therefore I use $_COOKIE['phpsessid'] to retrieve it. But often I use session_name() to replace phpsessid

[PHP] session_set_cookie_params

2003-07-29 Thread Hank TT
Hi, I've read the official manual on session handling, as well as the section in PHP Developer's Cookbook (2/e, Hughes Zmievski). But I still cannot make a cookie persist across browser sessions -- very frustrating. I use PHP 4.1.1 running as a CGI in Win32. Here is a snippet: