[PHP] Recursive array_push?

2006-01-26 Thread Kim Christensen
Has anyone out there stumbled over the issue of making multi-dimensional arrays out of bracket-separated strings? In a less fuzzy way of putting it: $str = [layer1][layer2][layer3][layer4] would become $str_array = Array( [layer1] = Array( [layer2] = Array( [layer3] = Array( [layer4] ) ) ) );

Re: [PHP] Recursive array_push?

2006-01-26 Thread Robin Vickery
On 1/26/06, Kim Christensen [EMAIL PROTECTED] wrote: I would really like PHP to have a function of building expressions with strings, and then execute them through a function - but that's just me it seems :-) You mean like create_function() ? -robin

Re: [PHP] Recursive array_push?

2006-01-26 Thread David Grant
Kim, May the hack-o-rama commence: ?php $str = [layer1][layer2][layer3][layer4]; $parts = explode(][, substr($str, 1, -1)); $text = ; foreach ($parts as $part) { $text .= 'a:1:{s:' . strlen($part) . ':' . $part . ';'; } $text .= 'b:1;' . str_repeat('}', count($parts));

Re: [PHP] wrapping anchor tags around a URL

2006-01-26 Thread Ahmed Saad
On 1/26/06, Richard K Miller [EMAIL PROTECTED] wrote: @(http://\S+)(?!\.)@ -- this still captures everything @(http://\S+?)(?!\.)@-- this captures too little hmm maybe this would work? @http://.+(?=\.)@

[PHP] Re: Recursive array_push?

2006-01-26 Thread M. Sokolewicz
Kim Christensen wrote: Has anyone out there stumbled over the issue of making multi-dimensional arrays out of bracket-separated strings? In a less fuzzy way of putting it: $str = [layer1][layer2][layer3][layer4] would become $str_array = Array( [layer1] = Array( [layer2] = Array( [layer3] =

Re: [PHP] Recursive array_push?

2006-01-26 Thread Jochem Maas
Kim Christensen wrote: Has anyone out there stumbled over the issue of making multi-dimensional arrays out of bracket-separated strings? In a less fuzzy way of putting it: $str = [layer1][layer2][layer3][layer4] would become $str_array = Array( [layer1] = Array( [layer2] = Array( [layer3] =

Re: [PHP] Recursive array_push?

2006-01-26 Thread David Grant
Kim, After some contemplation (and slightly less crack): ?php $str = [layer1][layer2][layer3][layer4]; $parts = array_reverse(explode(][, substr($str, 1, -1))); $array = FOO; foreach ($parts as $part) { $array = array($part = $array); } print_r($array); ? Array ( [layer1] = Array

Re: [PHP] Re: usr VAR value as a VAR Name

2006-01-26 Thread Fernando Anchorena
Fisrt thx to all for yours answers, I'm updating the mail because in hte last mail I'didn express my self correctly : EXAMPLE page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table; $res_pro = @mysql_query(

Re: [PHP] Re: usr VAR value as a VAR Name

2006-01-26 Thread Barry
Fernando Anchorena wrote: Fisrt thx to all for yours answers, I'm updating the mail because in hte last mail I'didn express my self correctly : EXAMPLE page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table;

Re: [PHP] Re: usr VAR value as a VAR Name

2006-01-26 Thread Fernando Anchorena
Barry wrote: Fernando Anchorena wrote: Fisrt thx to all for yours answers, I'm updating the mail because in hte last mail I'didn express my self correctly : EXAMPLE page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM

Re: [PHP] Re: usr VAR value as a VAR Name

2006-01-26 Thread Barry
Fernando Anchorena wrote: Barry wrote: Fernando Anchorena wrote: Fisrt thx to all for yours answers, I'm updating the mail because in hte last mail I'didn express my self correctly : EXAMPLE page1.php === form action=/page2.php?form=yes method=post

[PHP] Workaround ISP's redirect of 404 Not Found PHP pages?

2006-01-26 Thread Jim McIntyre
Hi, I searched archived messages for this, but didn't find an answer. If this should go to the installation list, please advise (and forgive!). I'm working on a site hosted at 1and1. I want to use a PHP-enabled custom 404 page, but something in their configuration is preventing it from

Re: [PHP][SOLVED] Re: usr VAR value as a VAR Name

2006-01-26 Thread Barry
Barry wrote: Fernando Anchorena wrote: Barry wrote: Fernando Anchorena wrote: Fisrt thx to all for yours answers, I'm updating the mail because in hte last mail I'didn express my self correctly : EXAMPLE page1.php === form action=/page2.php?form=yes

[PHP] Re: Workaround ISP's redirect of 404 Not Found PHP pages?

2006-01-26 Thread Barry
Jim McIntyre wrote: Hi, I searched archived messages for this, but didn't find an answer. If this should go to the installation list, please advise (and forgive!). I'm working on a site hosted at 1and1. I want to use a PHP-enabled custom 404 page, but something in their configuration is

Re: [PHP][SOLVED] Re: usr VAR value as a VAR Name

2006-01-26 Thread Chris Boget
echo $$foo Let me start by saying there is nothing wrong with the above and it's doing exactly what the OP needed. However, when I use variable variables, I prefer to use the following notation: ${$foo} It makes the coder's intention clear and makes it so that it can't be mistaken for a

[PHP] Re: Workaround ISP's redirect of 404 Not Found PHP pages?

2006-01-26 Thread Barry
Barry wrote: Thats what i found so far: http://de2.php.net/manual/en/ref.errorfunc.php#ini.error-append-string http://de2.php.net/manual/en/ref.errorfunc.php#ini.error-prepend-string http://de2.php.net/manual/en/ini.php#ini.list Most vars can be changed with ini_set and ini_get

Re: [PHP][SOLVED] Re: usr VAR value as a VAR Name

2006-01-26 Thread Barry
Chris Boget wrote: echo $$foo Let me start by saying there is nothing wrong with the above and it's doing exactly what the OP needed. However, when I use variable variables, I prefer to use the following notation: ${$foo} It makes the coder's intention clear and makes it so that it

[PHP] copy problem with HTTP wrapper

2006-01-26 Thread Laurent Vanstaen
Hi all, I'm trying to copy a file from my PHP server to another server (a home gateway, called a LiveBox). I've used this code : $livebox = 192.168.1.1; ... ... ... $crontab_livebox = http://.$livebox./cgi-bin/newCrontab;; if (!copy($crontab_temp_name, $crontab_livebox)) { echo br

[PHP] Re: Workaround ISP's redirect of 404 Not Found PHP pages?

2006-01-26 Thread James Benson
PHP is running as a CGI on the shared hosting servers, which is why your .htaccess isn't working for it. You will have to create the error rule within a php.ini file. That is so much bull, how then can it work for NON .php files? I know for a fact that CGI does not prevent you using

Re: [PHP] News

2006-01-26 Thread John Nichel
[EMAIL PROTECTED] wrote: Your archive is attached. I wonder how many people opened this. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] XML Session serializer - XMLDBX

2006-01-26 Thread Mark
Well, last week or so I noticed that Squirrelmail's session array contained recursive variable references and caused my serializer to crash on infinite recursion. Oh well, that's life. I found the time to add a variable stack for encoding to XML. If a variable is is_ref or has a refcount greater

Re: [PHP] way to write mysqli result set to disk

2006-01-26 Thread John Nichel
James Benson wrote: jonathan wrote: hmm is this a mysql 5 feature. could be interesting but haven't heard much about it. You cannot see the mysql 5 plastered all over the page? I can see at least 5 different sections that say MySQL 5

[PHP] Re: Workaround ISP's redirect of 404 Not Found PHP pages?

2006-01-26 Thread Jim McIntyre
At 3:32 PM + 1/26/06, James Benson wrote: PHP is running as a CGI on the shared hosting servers, which is why your .htaccess isn't working for it. You will have to create the error rule within a php.ini file. That is so much bull, how then can it work for NON .php files? I know for a

[PHP] Re: XML Session serializer - XMLDBX

2006-01-26 Thread Mark
Mark wrote: Well, last week or so I noticed that Squirrelmail's session array contained recursive variable references and caused my serializer to crash on infinite recursion. Oh well, that's life. I found the time to add a variable stack for encoding to XML. If a variable is is_ref or has

[PHP] HTML Question?

2006-01-26 Thread William Stokes
Hello, This is totally HTML question but I had to post cause I can't get this one to work myself How to print tables to a page so that they are placed side by side horizontally as long as there is screen width left and then continue to second row below? Like in many image galleries where

Re: [PHP] HTML Question?

2006-01-26 Thread David Grant
William, William Stokes wrote: How to print tables to a page so that they are placed side by side horizontally as long as there is screen width left and then continue to second row below? Like in many image galleries where thumpnails are dumped to screen and the lines of thumpnails scale

[PHP] automating creation of thumbnails

2006-01-26 Thread Geoff
I remember the other day someone was asking for a way to easily create a bunch of thumbnails from image files. I just spotted this: http://www.phpclasses.org/browse/package/2846.html This is a simple class that can be used to generate thumbnails of image files. It can resize the images so they

Re: [PHP][SOLVED] Re: usr VAR value as a VAR Name

2006-01-26 Thread Chris Boget
Let me start by saying there is nothing wrong with the above and it's doing exactly what the OP needed. However, when I use variable variables, I prefer to use the following notation: ${$foo} It makes the coder's intention clear and makes it so that it can't be mistaken for a possible typo

[PHP] header WWW-Authenticate Question

2006-01-26 Thread News1
Hi. I have been looking for this in several areas and I can't seem to find it. I'm new to PHP (any programming since FORTRAN, really :) so please forgive my ignorance. I am trying to send username/password credentials to a web server using a PHP script. This is done to automatically log

Re: [PHP] header WWW-Authenticate Question

2006-01-26 Thread Philip Hallstrom
I have been looking for this in several areas and I can't seem to find it. I'm new to PHP (any programming since FORTRAN, really :) so please forgive my ignorance. I am trying to send username/password credentials to a web server using a PHP script. This is done to automatically log into a web

RE: [PHP] automating creation of thumbnails

2006-01-26 Thread Weber Sites LTD
Here are some more to check out :) Dynamic Thumbnail Generation http://www.weberdev.com/ViewArticle-388.html upload one or more files, and show thumbs and html code of images, I images were uploaded. http://www.weberdev.com/get_example-3083.html Image Upload And Resize Script

Re: [PHP] HTML Question?

2006-01-26 Thread William Stokes
Jawohl :) David Grant [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William, William Stokes wrote: How to print tables to a page so that they are placed side by side horizontally as long as there is screen width left and then continue to second row below? Like in many image

[PHP] Apache is not parsing .php files

2006-01-26 Thread sanjay
Hi, I have a strange problem while trying to run php based applications. Lets start with phpMyAdmin, a very popular open source tool to manage MySQL written in php. I have already installed phpMyAdmin and was running fine. One day suddenly when I pointed my browser at :

[PHP] Connect to AS400

2006-01-26 Thread Justin Cook
We need to connect to a database on our AS400. Would this be best accomplished with ODBC? If not, what is the preferred method? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Sue
I am retrieving records from a MySQL database and need to just display each record one after the other on a page. I only want to display a maximum of 25 records per page though, and am wondering if there is a way to handle this easily within PHP? I'd like to use something like NEXT and

Re: [PHP] header WWW-Authenticate Question

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 1:02 pm, News1 wrote: I am trying to send username/password credentials to a web server using a PHP script. This is done to automatically log into a web camera from my workstation. I don't know if the header www-authenticate option is the correct one (or if it's

Re: [PHP] HTML Question?

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 11:35 am, William Stokes wrote: This is totally HTML question but I had to post cause I can't get this one to work myself How to print tables to a page so that they are placed side by side horizontally as long as there is screen width left and then continue to

Re: [PHP] copy problem with HTTP wrapper

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 9:28 am, Laurent Vanstaen wrote: Hi all, I'm trying to copy a file from my PHP server to another server (a home gateway, called a LiveBox). I've used this code : $livebox = 192.168.1.1; ... ... ... $crontab_livebox = http://.$livebox./cgi-bin/newCrontab;; if

Re: [PHP] header WWW-Authenticate Question

2006-01-26 Thread Manuel Lemos
Hello, I am trying to send username/password credentials to a web server using a PHP script. This is done to automatically log into a web camera from my workstation. I don't know if the header www-authenticate option is the correct one (or if it's even possible) to use for this. You may

Re: [PHP] Re: Workaround ISP's redirect of 404 Not Found PHP pages?

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 9:32 am, James Benson wrote: PHP is running as a CGI on the shared hosting servers, which is why your .htaccess isn't working for it. You will have to create the error rule within a php.ini file. That is so much bull, how then can it work for NON .php files? I

Re: [PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Jay Paulson
You could always use the LIMIT functionality in MySQL SELECT * FROM table LIMIT 0,25 Then just pass the variables for the limit to start at and how many you want returned in your query. SELECT * FROM table LIMIT $start,$num_returned So looking at records 26 through 50 your links would look

Re: [PHP] Re: adapting some code from a phpbb mod to my site

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 7:46 am, Barry wrote: 7BoZaR secret wrote: Hello, I wish to integrate some code of MOD for phpbb forum named gf-portail: http://www.gf-phpbb.info/dlfile.php?id=31 , to my HTML website. In the menus of right-hand side (Last subjects, Which is on line?,

Re: [PHP] Use VAR string value AS VAR Name

2006-01-26 Thread Richard Lynch
On Wed, January 25, 2006 6:11 pm, Fernando Anchorena wrote: I'm stuck trying to get work this : This is an example page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table; $res_pro = @mysql_query( $sql_pro); while

[PHP] Basic OOP Question

2006-01-26 Thread Chris Kennon
Hi, This is my first post so a cheery hello, this script from php.net: [www.php.net] ?php class SimpleClass { // member declaration public $var = 'a default value'; // method declaration public function displayVar() { echo $this-var; } } mySimpleClass = new

Re: [PHP] Recursive array_push?

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 2:50 am, Kim Christensen wrote: Has anyone out there stumbled over the issue of making multi-dimensional arrays out of bracket-separated strings? In a less fuzzy way of putting it: $str = [layer1][layer2][layer3][layer4] would become $str_array = Array( [layer1] =

Re: [PHP] Basic OOP Question

2006-01-26 Thread Richard Davey
On 26 Jan 2006, at 21:42, Chris Kennon wrote: mySimpleClass = new SimpleClass(); $mySimpleClass ^ ^ ^ Cheers, Rich -- http://www.corephp.co.uk Zend Certified Engineer PHP Development Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Weber Sites LTD
Check out : Pagination http://www.weberdev.com/get_example-4242.html Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com Free Uptime Monitor : http://uptime.weberdev.com PHP content for your site :

Re: [PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 2:27 pm, Sue wrote: I am retrieving records from a MySQL database and need to just display each record one after the other on a page. I only want to display a maximum of 25 records per page though, and am wondering if there is a way to handle this easily within

Re: [PHP] Connect to AS400

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 2:23 pm, Justin Cook wrote: We need to connect to a database on our AS400. Would this be best accomplished with ODBC? If not, what is the preferred method? Thanks! The AS400 was discussed on this list, or possible on the predecessor list which was just [EMAIL PROTECTED]

Re: [PHP] Apache is not parsing .php files

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 2:19 pm, sanjay wrote: I have a strange problem while trying to run php based applications. Lets start with phpMyAdmin, a very popular open source tool to manage MySQL written in php. I have already installed phpMyAdmin and was running fine. One day suddenly when I

Re: [PHP] Basic OOP Question

2006-01-26 Thread Jay Paulson
Hi, This is my first post so a cheery hello, this script from php.net: [www.php.net] ?php class SimpleClass { // member declaration public $var = 'a default value'; // method declaration public function displayVar() { echo $this-var; } }

Re: [PHP] Apache is not parsing .php files

2006-01-26 Thread Ray Hauge
On Thursday 26 January 2006 03:28 pm, Richard Lynch wrote: On Thu, January 26, 2006 2:19 pm, sanjay wrote: I have a strange problem while trying to run php based applications. Lets start with phpMyAdmin, a very popular open source tool to manage MySQL written in php. I have already

[PHP] Isolating a php directory on a main server

2006-01-26 Thread The Doctor
How can one do this ?? CLient wants to isolate away so development code so that only he can upload it and no one in the world can see it. -- Member - Liberal International This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] God Queen and country! Beware Anti-Christ rising! Born 29 Jan 1969

Re: [PHP] Isolating a php directory on a main server

2006-01-26 Thread Ray Hauge
On Thursday 26 January 2006 03:48 pm, The Doctor wrote: How can one do this ?? CLient wants to isolate away so development code so that only he can upload it and no one in the world can see it. -- Member - Liberal International This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] God Queen

Re: [PHP] Connect to AS400

2006-01-26 Thread James Lobley
On 1/26/06, Justin Cook [EMAIL PROTECTED] wrote: We need to connect to a database on our AS400. Would this be best accomplished with ODBC? If not, what is the preferred method? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Connect to AS400

2006-01-26 Thread James Lobley
On 1/26/06, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, January 26, 2006 2:23 pm, Justin Cook wrote: We need to connect to a database on our AS400. Would this be best accomplished with ODBC? If not, what is the preferred method? Thanks! The AS400 was discussed on this list, or possible

Re: [PHP] Google using PHP @ http://www.google-store.com

2006-01-26 Thread ben johnson
Oscommerce itself hasn't released a new version for an age. I am guessing their next release will be better. Still ive seen a lot worse... Strange javascript with frames aggh! I think it was a quick knock-up job to see if anyone else would buy their tat. I don't see the google radio they sent me

[PHP] Re: $_SESSION saves all values but Class -- works on one server butnot another?! [SOLVED]

2006-01-26 Thread Daevid Vincent
UGH After a WEEK of wasted time, I finally tracked this down. If you have a __destructor() on a class object that you're saving in a $_SESSION, then that object will have all it's values NULL'd out when you call session_start() and retrieve it. http://www.php.net/session-set-save-handler