[PHP] Query string question

2009-01-13 Thread Jônatas Zechim
I have something like this on my site:

mysite.com/índex.php?msg=Transa%25E7%25E3o+n%25E3o+autorizada

i need to convert  Transa%25E7%25E3o+n%25E3o+autorizada to Transação não 
autorizada.

The letters ç ã, and others (é, í, ...).

Someone can help me?



-Mensagem original-
De: Eric Butera [mailto:eric.but...@gmail.com] 
Enviada em: terça-feira, 13 de janeiro de 2009 17:09
Para: Dan Shirah
Cc: PHP-General list
Assunto: Re: [PHP] Suggestions?

On Tue, Jan 13, 2009 at 2:00 PM, Dan Shirah mrsqua...@gmail.com wrote:
 Hello all!

 I have written some code that will calculate all static and floating
 holidays.

 I have also written some code that will act as a business day counter.

 My application currently determines a set number of business days to count.
 (2 business days and 7 business days from today)

 This part works great and gives the results I want.

 What I need to do is tie in my pre dertermined static and floating holidays
 and factor those into the busniess day counter.

 I was thinking of putting the holidays into an array and then doing a check
 to determine if any date in the array equaled today's date through the
 ending date.

 But I'm drawing a blank on how to create the array.

 // Create an empty array
 $holidays = array();

 But then how do I put each holiday value into the array as it is
 calculated?  Can I assign it that way?

 Or should I calculate all of the values and then build the array at the end?

 Or should I not even use an array?

 Thanks,
 Dan


Are you asking how to do

$holidays[] = date;
array_push($holidays, date); ?

If you were generating dates to compare against today tho, you could
just return upon a match at that point and not even store them.  No
point in creating some big array in a loop only to loop through it
again when you could have done it the first time around.  I'd put this
into a function though so that I could return out upon a match.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Query string question

2009-01-13 Thread Robert Cummings
On Tue, 2009-01-13 at 17:21 -0200, Jônatas Zechim wrote:
 I have something like this on my site:
 
 mysite.com/índex.php?msg=Transa%25E7%25E3o+n%25E3o+autorizada
 
 i need to convert  Transa%25E7%25E3o+n%25E3o+autorizada to Transação não 
 autorizada.
 
 The letters ç ã, and others (é, í, ...).
 
 Someone can help me?

urldecode()

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] QUERY STRING question

2002-03-11 Thread jhj hjhjhj

Hey again list,

Anybody know what the diffrance in using %20 and +
as a space in the query string is?

Josepablo Pérez

_
Do You Yahoo!?
La emoción e intensidad del deporte en Yahoo! Deportes. http://deportes.yahoo.com.mx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] QUERY STRING question

2002-03-11 Thread Hiroshi Ayukawa

I guess they are almost same.
But, the contents of $QUERY_STRING are different.

Hiroshi Ayukawa
http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php