php-windows Digest 6 Jan 2003 06:47:47 -0000 Issue 1521
Topics (messages 17653 through 17664):
loop through string
17653 by: Gregory Lewis
17654 by: Ignatius Reilly
17656 by: Cam Dunstan
17657 by: Gregory Lewis
17658 by: Gregory Lewis
Re: PHP 4.3.0 no gif support?
17655 by: Paul Roberts
Re: PHP from the Browser?
17659 by: Harvey Frey
Capturing Events
17660 by: Harvey Frey
17661 by: Luke Woollard
GD, UNICODE & RTL
17662 by: Mottaghi
17663 by: toby z
MYSQL & PHP + GRAPH
17664 by: RBRoa.mnd.philcom.com
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi my name is Greg Lewis and I'm new to this list and to PHP. I have experience with
Cold Fusion, and so hopefully the transition won't be too hard.
My first question: How do I loop through a comma delimited list?
ex: $mylist = "a,b,c,d,e,f,g";
thanks for your time and patience,
Greg
--- End Message ---
--- Begin Message ---
// transform string into an array
$arr = explode( ',', $mylist ) ;
// loop the array
foreach( $arr as $element )
Ignatius
____________________________________________
----- Original Message -----
From: "Gregory Lewis" <[EMAIL PROTECTED]>
To: "php-windows" <[EMAIL PROTECTED]>
Sent: Sunday, January 05, 2003 8:18 PM
Subject: [PHP-WIN] loop through string
> Hi my name is Greg Lewis and I'm new to this list and to PHP. I have
experience with Cold Fusion, and so hopefully the transition won't be too
hard.
>
> My first question: How do I loop through a comma delimited list?
>
> ex: $mylist = "a,b,c,d,e,f,g";
>
> thanks for your time and patience,
>
> Greg
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Welcome to the list Greg,
There are thousand ways - try converting the string to an array then looping
through the array with either a for() loop, a do-while or a foreach()
$my_array = explode(",", $mylist);
foreach ($my_array as $one_element) {
echo $one_element."<br>";
}
- or -
$my_array = explode(",", $mylist);
$array_count = count($my_array);
for ($j = 0; $j < $array_count; $j++) {
echo $my_array[$j];
echo "<br>\n";
}
etc etc.
Have a squizz at the manual on each() and list() functions and the while()
constructs also, and a very rich set of array and string functions in
general.
----- Original Message -----
From: "Gregory Lewis" <[EMAIL PROTECTED]>
To: "php-windows" <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 6:18 AM
Subject: [PHP-WIN] loop through string
> Hi my name is Greg Lewis and I'm new to this list and to PHP. I have
experience with Cold Fusion, and so hopefully the transition won't be too
hard.
>
> My first question: How do I loop through a comma delimited list?
>
> ex: $mylist = "a,b,c,d,e,f,g";
>
> thanks for your time and patience,
>
> Greg
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Thanks Cam and Rasmus, looks simple enough. You guys are awesome.
-Greg
---------- Original Message ----------------------------------
From: "Cam Dunstan" <[EMAIL PROTECTED]>
Date: Mon, 6 Jan 2003 08:10:43 +1100
>Welcome to the list Greg,
>
>There are thousand ways - try converting the string to an array then looping
>through the array with either a for() loop, a do-while or a foreach()
>
>
>$my_array = explode(",", $mylist);
>
>foreach ($my_array as $one_element) {
> echo $one_element."<br>";
>}
>
>
> - or -
>
>$my_array = explode(",", $mylist);
>
>$array_count = count($my_array);
>
>for ($j = 0; $j < $array_count; $j++) {
>echo $my_array[$j];
>echo "<br>\n";
>}
>
>etc etc.
>
>Have a squizz at the manual on each() and list() functions and the while()
>constructs also, and a very rich set of array and string functions in
>general.
>
>
>
>----- Original Message -----
>From: "Gregory Lewis" <[EMAIL PROTECTED]>
>To: "php-windows" <[EMAIL PROTECTED]>
>Sent: Monday, January 06, 2003 6:18 AM
>Subject: [PHP-WIN] loop through string
>
>
>> Hi my name is Greg Lewis and I'm new to this list and to PHP. I have
>experience with Cold Fusion, and so hopefully the transition won't be too
>hard.
>>
>> My first question: How do I loop through a comma delimited list?
>>
>> ex: $mylist = "a,b,c,d,e,f,g";
>>
>> thanks for your time and patience,
>>
>> Greg
>>
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Excuse me, that was a thanks to Cam and Ignatius, and the loop-through-llist using the
explode function was just the ticket.
-Greg Lewis
---------- Original Message ----------------------------------
From: "Gregory Lewis" <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
Date: Sun, 5 Jan 2003 15:30:14 -0600
>Thanks Cam and Rasmus, looks simple enough. You guys are awesome.
>
>-Greg
>
>---------- Original Message ----------------------------------
>From: "Cam Dunstan" <[EMAIL PROTECTED]>
>Date: Mon, 6 Jan 2003 08:10:43 +1100
>
>>Welcome to the list Greg,
>>
>>There are thousand ways - try converting the string to an array then looping
>>through the array with either a for() loop, a do-while or a foreach()
>>
>>
>>$my_array = explode(",", $mylist);
>>
>>foreach ($my_array as $one_element) {
>> echo $one_element."<br>";
>>}
>>
>>
>> - or -
>>
>>$my_array = explode(",", $mylist);
>>
>>$array_count = count($my_array);
>>
>>for ($j = 0; $j < $array_count; $j++) {
>>echo $my_array[$j];
>>echo "<br>\n";
>>}
>>
>>etc etc.
>>
>>Have a squizz at the manual on each() and list() functions and the while()
>>constructs also, and a very rich set of array and string functions in
>>general.
>>
>>
>>
>>----- Original Message -----
>>From: "Gregory Lewis" <[EMAIL PROTECTED]>
>>To: "php-windows" <[EMAIL PROTECTED]>
>>Sent: Monday, January 06, 2003 6:18 AM
>>Subject: [PHP-WIN] loop through string
>>
>>
>>> Hi my name is Greg Lewis and I'm new to this list and to PHP. I have
>>experience with Cold Fusion, and so hopefully the transition won't be too
>>hard.
>>>
>>> My first question: How do I loop through a comma delimited list?
>>>
>>> ex: $mylist = "a,b,c,d,e,f,g";
>>>
>>> thanks for your time and patience,
>>>
>>> Greg
>>>
>>>
>>> --
>>> PHP Windows Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>>
>>--
>>PHP Windows Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
as Rasmus said on phpgeneral
" The Windows binary was built without the right #define to enable the GIF support.
You will have to wait for the next Windows build before this will work."
so it should be fixed in the next Windows build.
i believe the patent has expired or will do soon.
Best Wishes & Happy New Year
Paul Roberts
[EMAIL PROTECTED]
++++++++++++++++++++++++
----- Original Message -----
From: "Stephen Edmonds" <[EMAIL PROTECTED]>
To: "PHP Windows Helplist" <[EMAIL PROTECTED]>
Cc: "Brian Weil" <[EMAIL PROTECTED]>
Sent: Sunday, January 05, 2003 6:38 PM
Subject: Re: [PHP-WIN] PHP 4.3.0 no gif support?
Due to the copyright laws, GD had to remove all gif support. I believe you
can still open .gif files, but you can not edit/save them. You should try
using something which is open license like a .png file...
I am not awear of any gif section in phpinfo... i've yet to see one. I could
be wrong, but if that happened then I would have to kill you all... ;-)
Stephen
----- Original Message -----
From: "Brian Weil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 05, 2003 5:31 PM
Subject: Re: [PHP-WIN] PHP 4.3.0 no gif support?
> So...
>
> WIll gif support ever be available on win32? Can a patched gd.dll be found
> somewhere with readonly gif support or will we have to re-install php when
> the binary is updated? I've been (patiently) waiting for this since GD1.6.
>
> Thanks,
> Brian
>
> "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hrm.. Whoever built the Windows binary didn't define HAVE_GD_GIF_READ I
> > guess. Or perhaps it should go into main/config.w32.h.in assuming we
are
> > always going to build the windows binary against the bundled gd library.
> >
> > -Rasmus
> >
> > On Fri, 3 Jan 2003, Zac Barton wrote:
> >
> > > hi all, i thought php 4.3 was ment to have read-only access to gif
> images?
> > >
> > >
> > > all i get via phpinfo(); is:
> > >
> > > GD Support enabled
> > > GD Version bundled (2.0 compatible)
> > > FreeType Support enabled
> > > FreeType Linkage with freetype
> > > JPG Support enabled
> > > PNG Support enabled
> > > WBMP Support enabled
> > >
> > > wheres the gif read support?
> > >
> > > php 4.3 d/loaded via www.php.net so its the correct version.. what am
i
> > > missing?
> > >
> > > does gif read support mean i can load a gif image then output it as a
> PNG?
> > >
> > > many thanks in advance
> > >
> > > zac barton
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Steve:
Hoo Ha! That just about does it!
As you suggested, I downloaded the free Maguma IDE. I told it where the
php.exe was, and set it to associate with .php extensions.
Now I can click on any .php file, and the Maguma IDE comes up with the
code. Hit F5 and I've got the output in my Browser window.
Without a local server! Now all I have to do is learn to program in
PHP!
<G>
Thanks!
Harvey
----- Original Message -----
From: "Stephen Edmonds" <[EMAIL PROTECTED]>
To: "PHP Windows Helplist" <[EMAIL PROTECTED]>
Cc: "Harvey Frey" <[EMAIL PROTECTED]>
Sent: Sunday, January 05, 2003 2:35 AM
Subject: Re: [PHP-WIN] PHP from the Browser?
> Actually now that I come to think about it, there is a 3rd option. I use
a
> script editor called Magnum PHP Studio. It has a feature where it can run
> your script in PHP acting like the webserver. I am not sure if you can
use
> it to submit forms etc etc, but it would provide a basic method for you
to
> test your files for parse errors/layout errors etc. You can download it
or
> find out more infomation at
> http://www.maguma.com/products/index.php
>
> ----- Original Message -----
> From: "Harvey Frey" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, January 05, 2003 6:35 AM
> Subject: Re: [PHP-WIN] PHP from the Browser?
>
>
> > Hi metac0m:
> >
> > > 1. I think that there is an element of confusion here:
> >
> > You're certainly right about that! <G>
> > >
> > > a. php can be used from the command line (this is usefull for various
> > > tools, such a cron jobs or time scheduled jobs etc...), here's an
> > > example:
> > <snip>
> >
> > True, but the faq says that it can be executed locally if the php
> > program exists locally.
> > I would like to be able to debug my scripts locally before uploading
them to
> > my server. So I assumed that it would act like a plug-in in my browser.
> >
> > I have no desire to run a server. That's why I pay someone to host
my webpage.
> >
> > If I can execute php from the command line, without running Apache,
why
> > can't I execute it from my browser within Windows, without running
Apache?
> >
> > Is it truly the case that I can't debug a script without FTPing it
up to
> > my host and running it remotely, even if I have the entire PHP program
> > locally?
> >
> > Harvey
--- End Message ---
--- Begin Message ---
All:
Javascript has a multitude of functions to capture events, like onClick.
I haven't seen similar functions described in the manual for PHP.
Have I just missed them?
Or are those facilities not available in PHP?
If they are available, I'd appreciate being pointed to the documentation.
Thanks.
Harvey
--- End Message ---
--- Begin Message ---
Dude -> PHP is a (primarily) a server side scripting language so capturing
events through functions like 'onMouseOver' etc aren't applicable..
http://www.php.net/manual/en/tutorial.php
Luke Woollard
-----Original Message-----
From: Harvey Frey [mailto:[EMAIL PROTECTED]]
Sent: Monday, 6 January 2003 1:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Capturing Events
All:
Javascript has a multitude of functions to capture events, like onClick.
I haven't seen similar functions described in the manual for PHP.
Have I just missed them?
Or are those facilities not available in PHP?
If they are available, I'd appreciate being pointed to the documentation.
Thanks.
Harvey
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi all,
I want to write a Right-to-Left (like Arabic languages) sentence in a bitmap
by unicode.......but HOW???
:) thanks, bye
--- End Message ---
--- Begin Message ---
hi
i ve been workin with unicode for the last few months n i think ill
be able to help you if u ll pleez be a bit more precise bout this
why do u want to write in bitmap ????
do u want to use it with php or what ????
if u just wanna type sumthin in unicode from left to write in a
bitmap file select the text tool then select a font ofcorse then
press ctrl&shift LEFT togather
if u want arabic srcipt fonts in unicode ur wselcome to vist
www.zaban.net for free downloadable unicode fonts
that shud do fo now i guess
good luck
toby ......
--- Mottaghi <[EMAIL PROTECTED]> wrote: > Hi all,
> I want to write a Right-to-Left (like Arabic languages) sentence in
> a bitmap
> by unicode.......but HOW???
>
> :) thanks, bye
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
Hi,
I am using MySQL as my database backend server and PHP to poll the data. I
am wondering if someone could guide in presenting this data by a GRAPH using
PHP.
I really appreciate ur reply
R---- R--
--- End Message ---