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
Etho
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 "wie
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 'Z
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.
W
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 do
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 = a';
print 'b++';
if ($a > $b) print 'a > b';
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 strange pr
Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);
echo <<
ID#, {$row['id']}
TicklerName, {$row['task_name']}
Instructions, Instructions
DayOfWeekWord, {$dowword}
DateToReschedule, name='tasks[{$row['id']}][txtReschedule]' value
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 you
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:
$taskTime=m
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, $minute,$
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 trim($x,'
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 it
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]> wrot
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 i
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
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 Re
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
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
http://www.tonymarston.net
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
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; howe
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 thi
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
bui
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 rat
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
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 pr
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
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
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.
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 ("\nretval =\"". $retval. "\"\n");
It was working perfectly for years.
45 matches
Mail list logo