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] ) ) ) );
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
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));
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://.+(?=\.)@
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] =
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] =
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
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(
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;
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
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
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
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
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
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
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
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
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 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
[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:
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
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
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
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
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
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
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
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
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
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
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
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
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 :
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
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
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
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
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
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
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
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
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?,
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
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
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] =
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:
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 :
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
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]
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
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;
}
}
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
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
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
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
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
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
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
58 matches
Mail list logo