php-general Digest 9 Jul 2007 19:59:39 - Issue 4894
Topics (messages 258482 through 258512):
Re: A very strange loop!
258482 by: Fredrik Thunberg
258483 by: Darren Whitlen
258484 by: Jason
258485 by: Fredrik Thunberg
258486 by: Chris
258487
Hello all,
I met a very strange problem today. Take a look at the codes below:
for ($i = 'A'; $i 'Z'; $i++) {
echo $i . ' ';
}
If you think the output is A-Z, please run it on your server and try.
Who can tell me why the result is not A-Z?
--
Zhang Xiao
Junior engineer, Web development
For exactly the same reason as
for( $i = 0; $i 10; $i++)
produces 0-9
It loops whule $i is lesser than 'Z'
When $i becomes 'Z' it stops and doesn't echo
But i guess you're having trouble with (note the '='):
for ($i = 'A'; $i = 'Z'; $i++)
{
echo $i . ' ';
}
This might produce a wierd
Xell Zhang wrote:
Hello all,
I met a very strange problem today. Take a look at the codes below:
for ($i = 'A'; $i 'Z'; $i++) {
echo $i . ' ';
}
If you think the output is A-Z, please run it on your server and try.
Who can tell me why the result is not A-Z?
The result doesnt include the
Because you need $i= 'Z' to get Z included as well.
J
At 08:49 09/07/2007, Xell Zhang wrote:
Hello all,
I met a very strange problem today. Take a look at the codes below:
for ($i = 'A'; $i 'Z'; $i++) {
echo $i . ' ';
}
If you think the output is A-Z, please run it on your server and try.
No, that won't work
Either use != 'AA'
or
for( $i = ord('A'); $i = ord('Z'); $i++)
{
echo chr( $i ) . ' ';
}
Jason skrev:
Because you need $i= 'Z' to get Z included as well.
J
At 08:49 09/07/2007, Xell Zhang wrote:
Hello all,
I met a very strange problem today. Take a look at the codes
Xell Zhang wrote:
Hello all,
I met a very strange problem today. Take a look at the codes below:
for ($i = 'A'; $i 'Z'; $i++) {
echo $i . ' ';
}
If you think the output is A-Z, please run it on your server and try.
Who can tell me why the result is not A-Z?
Try
foreach (range('a', 'z') as
Xell Zhang wrote:
for ($i = 'A'; $i 'Z'; $i++) {
echo $i . ' ';
}
Rather do it like this:
for ($i = 65; $i 91; $i++) {
echo chr($i) . ' ';
}
--
Regards,
Clive.
Real Time Travel Connections
{No electrons were harmed in the creation, transmission or reading of
this email. However, many
I'm using XSLT to make a website template and XML to describe the data on my
website. Do I parse the data from MySQL to XML in order to apply styles and
display them as XHTML with XSLT?
I would have to use PHP to parse XML, however I was unclear on how to pass
MySQL data to XML in order for it
Man-wai Chang wrote:
I asked here because I believe good PHP programmers are usually
well-versed in client-side stuffs. :)
That comment reeks of NLP :)
clive
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
OK. I did test like this:
$a = 'Z';
$b = $a;
$b++;
print 'b = abr /';
print 'b++br /';
if ($a $b) print 'a bbr /';
The output is funny:)
Thanks all of you! I think clive's way is the best for me:)
On 7/9/07, Chris [EMAIL PROTECTED] wrote:
Xell Zhang wrote:
Hello all,
I met a very
Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);
echo HTML
tr
td bgcolor={$rowColor}ID#, {$row['id']} /td
td bgcolor={$rowColor}TicklerName, {$row['task_name']} /td
td bgcolor={$rowColor}Instructions, a href='{$row
Nathan Nobbe wrote:
On 7/6/07, Tijnema [EMAIL PROTECTED] wrote:
Completely missed it LOL, it looks for it in /usr/lib :S
Is that normal?
i beleive it depends on the OS/distribution. on gentoo php.ini is located
my ubuntu box looks like this:
etc/php5
|-- apache2
| `-- php.ini
|-- cgi
|
Jason Pruim wrote:
Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);
im not certain, but I dont think you can pass the date to mktime as 1
variable, the function requires the following
mktime($hour, $minute,$second, $month , $day ,$year);
so maybe
On Sun, Jul 08, 2007 at 06:30:54PM -0700, Jim Lucas wrote:
Rick Pasotto wrote:
I'm using the PEAR Crypt_Blowfish module. When I decrypt the encrypted
string the result is the original plus some '\ufffd' bytes. How can I
get rid of those extra bytes? I've tried both trim($x,'\ufffd') and
Hi list.
I am quite new in the area.
I found a difference between PHP 5.2.4 to 5.0.4 in case of passing
parameter to function, with default value:
f1($par=0);
in 5.2.4 the par is assigned to zero AFTER function call
and thus, par is always ZERO !
The desired code in 5.2.4 should probably be:
Hi,
correct syntax for mktime is mktime( int hour, int minute, int second, int
month, int day, int year)
--
Shafiq Rehman (ZCE)
http://www.phpgurru.com | http://shafiq.pk
Cell: +92 300 423 9385
On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote:
Okay so given this section of code:
Kelvin,
you will want to use SimpleXML if you can or DOM if you have to to build XML
data. you will populate certain portions of said XML using data from the
database. Then said XML is handed to the XSLT processor along w/ an XSL
file. The XSL file makes reference to the XML that you give it
On Jul 9, 2007, at 9:02 AM, clive wrote:
Jason Pruim wrote:
Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);
im not certain, but I dont think you can pass the date to mktime as
1 variable, the function requires the following
mktime($hour,
Rick Pasotto wrote:
On Sun, Jul 08, 2007 at 06:30:54PM -0700, Jim Lucas wrote:
Rick Pasotto wrote:
I'm using the PEAR Crypt_Blowfish module. When I decrypt the encrypted
string the result is the original plus some '\ufffd' bytes. How can I
get rid of those extra bytes? I've tried both
Jason Pruim wrote:
Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);
where are you getting the $_POST['txtReschedule'] var from?
in the html below, your var is $_POST['tasks'][#]['txtReschedule']
What does this var value look like?
try strtotime() on
On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:
Hi,
correct syntax for mktime is mktime( int hour, int minute, int second, int
month, int day, int year)
--
Shafiq Rehman (ZCE)
http://www.phpgurru.com | http://shafiq.pk
Cell: +92 300 423 9385
On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote:
On 7/8/07, Mario Guenterberg [EMAIL PROTECTED] wrote:
On Sat, Jul 07, 2007 at 02:08:21AM +0200, Tijnema wrote:
Hi,
I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in
/etc
I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
to /etc, but it
On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:
On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:
Hi,
correct syntax for mktime is mktime( int hour, int minute, int second, int
month, int day, int year)
--
Shafiq Rehman (ZCE)
http://www.phpgurru.com | http://shafiq.pk
Cell: +92 300
On 7/9/07, Tijnema [EMAIL PROTECTED] wrote:
On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:
On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:
Hi,
correct syntax for mktime is mktime( int hour, int minute, int second, int
month, int day, int year)
--
Shafiq Rehman (ZCE)
On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:
On 7/9/07, Tijnema [EMAIL PROTECTED] wrote:
On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:
On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:
Hi,
correct syntax for mktime is mktime( int hour, int minute, int second,
int
month,
Try these for size:
http://www.tonymarston.net/php-mysql/domxml.html and
http://www.tonymarston.net/php-mysql/sablotron.html
http://www.tonymarston.net/php-mysql/dom.html and
http://www.tonymarston.net/php-mysql/xsl.html
There is also a sample application available at
Tony,
this material looks quite excellent; thanks for sharing.
-nathan
On 7/9/07, Tony Marston [EMAIL PROTECTED] wrote:
Try these for size:
http://www.tonymarston.net/php-mysql/domxml.html and
http://www.tonymarston.net/php-mysql/sablotron.html
http://www.tonymarston.net/php-mysql/dom.html
On Mon, Jul 09, 2007 at 07:45:10AM -0700, Jim Lucas wrote:
Rick Pasotto wrote:
On Sun, Jul 08, 2007 at 06:30:54PM -0700, Jim Lucas wrote:
Rick Pasotto wrote:
I'm using the PEAR Crypt_Blowfish module. When I decrypt the encrypted
string the result is the original plus some '\ufffd' bytes. How
i havent had time to fully explore the material from Tony yet, but so far
ive been building XML entirely in memory rather than reading in a complete
file, parsing it and placing data at certain points. one thing i would like
to explore is either DTDs or XMLSchema to validate the XML against. in
Hello,
I am running PHP 5.2.0 on a RHEL4 server with FTP and OpenSSL enabled:
ftp
FTP support = enabled
openssl
OpenSSL support = enabled
OpenSSL Version = OpenSSL 0.9.7a Feb 19 2003
I am aware of the issue of ftp_ssl_connect() silently failing to
ftp_connect() in my version of PHP;
Rick Pasotto wrote:
On Mon, Jul 09, 2007 at 07:45:10AM -0700, Jim Lucas wrote:
Rick Pasotto wrote:
On Sun, Jul 08, 2007 at 06:30:54PM -0700, Jim Lucas wrote:
Rick Pasotto wrote:
I'm using the PEAR Crypt_Blowfish module. When I decrypt the encrypted
string the result is the original plus some
On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
I've build my own Linux, so good to know how to change it :)
Tijnema
Ahh, a linux from scratch user, eh? :-)
If you need it or want some usefull input, I have very usefull
build scripts for apache/php and mysql/postgresql. I use this
On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:
On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
I've build my own Linux, so good to know how to change it :)
Tijnema
Ahh, a linux from scratch user, eh? :-)
If you need it or want some usefull input, I have very usefull
build
Wouldn't XSLT document be filled with input forms if I want to receive
information from the customers?
XHTML forms are probly the most ubiquitous way to get data from a user to an
application. and to be specific, the xsl files are those that would
contain the XHTML forms.
There is no great
On Mon, Jul 09, 2007 at 10:38:24PM +0200, Tijnema wrote:
On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:
On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
I've build my own Linux, so good to know how to change it :)
Tijnema
Ahh, a linux from scratch user, eh? :-)
dollop absolution monogamy gallop jog
heuristic stifle cove injudicious stab togs equitable averse
concord brazzaville punish deed detroit
Kevin,
would you mind sending the particular url w/ the content you are referring
to?
also, data doesnt necessarily need to go through xml on its way back to the
database.
consider a web form for instance which might submit data to your application
via HTTP POST.
in that case you could simply
I said,
Kevin
my bad; meant to say Kelvin..
-nathan
On 7/9/07, Nathan Nobbe [EMAIL PROTECTED] wrote:
Kevin,
would you mind sending the particular url w/ the content you are referring
to?
also, data doesnt necessarily need to go through xml on its way back to
the database.
consider a web
On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:
On Mon, Jul 09, 2007 at 10:38:24PM +0200, Tijnema wrote:
On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:
On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
I've build my own Linux, so good to know how to change it :)
Oh yeah, the problem isn't that I'm using - instead of =. Well that was a
problem but I fixed that and it's still not working.
- Dan
Dan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a little problem assigning a value to an array which has a key.
It's simple, I just
Oh yeah, the problem isn't that I'm using - instead of =. Well that was a
problem but I fixed that and it's still not working.
- Dan
Dan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a little problem assigning a value to an array which has a key.
It's simple, I just
I'm having a little problem assigning a value to an array which has a key.
It's simple, I just don't know what I'm doing wrong.
foreach($Checkout as $value)
{
$products[] = $value['productName'] -
$value['actualValue'];
}
HELP!
Daniel Novotny wrote:
Hello,
I am running PHP 5.2.0 on a RHEL4 server with FTP and OpenSSL enabled:
ftp
FTP support = enabled
openssl
OpenSSL support = enabled
OpenSSL Version = OpenSSL 0.9.7a Feb 19 2003
I am aware of the issue of ftp_ssl_connect() silently failing to
ftp_connect()
Dan wrote:
Oh yeah, the problem isn't that I'm using - instead of =. Well that
was a problem but I fixed that and it's still not working.
- Dan
Dan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a little problem assigning a value to an array which has a
key. It's
We used to use php 4 on our web server on win2000, and use the system()
to call some DOS programs. That how we call it:
$cmd = c:\\Inetpub\\wwwroot\\test.exe;
$last_line = system($cmd, $retval);
print (br\nretval =\. $retval. \br\n);
It was working perfectly for years.
46 matches
Mail list logo