Re: [PHP] Re: Preferred Syntax

2011-12-18 Thread Robert Cummings

On 11-12-17 09:42 AM, Eric Butera wrote:

Hi Adam,

Thanks for the reply, noted!  I was coming from the angle that I've
had to deal with a lot of code that is 2000 lines of
php/html/javascript inside heredocs, mixed quote escaping, etc.  I was
hoping to prevent that from becoming a new thing in this persons code
if that was the case.  Apologies for assuming.


I understand that point of view, but your overarching statement of using 
full separation of presentation and logic at all times is wrong in the 
general case. Sometimes a 10 line script of mixed logic and presentation 
is just what the doctor ordered... but that might happen more often when 
doing small concise command-line scripts :)


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Working on a Subsummary Report

2011-12-18 Thread Jim Lucas
On 12/17/2011 6:14 PM, DealTek wrote:
>>>
>>
>> for the above to work right, you will need to loop through the mysql result 
>> set
>> one time.  Placing all the results in to one large array.  Then you can loop
>> through the array as many times as needed.
>>
>> What you will probably find is that you can sort all the data into the proper
>> order withing your SQL statement.  Then display the data looping through the
>> mysql result set once without having to create the additional array 
>> mentioned in
>> my first statement above.
> 
> 
> 
> Thanks Jim,
> 
> I will look into how to make this work with arrays...
> 
> more beginner questions...
> 
> - as stated -  when I try to loop through 2x ...
> - the table 2 only shows 1 record..
> - Q: ... like the query number row number? needs to be reset - but how?
> 
> So is it not possible to loop more than 1x? Is that why we are loading into 
> array?

Exactly

> 
> 
> --
> Thanks,
> Dave - DealTek
> deal...@gmail.com
> [db-11]


-- 
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/

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



Re: [PHP] Converting a Unicode code to related charachter

2011-12-18 Thread Fatih P.
there is iconv to do this. you should better check that.



On Sun, Dec 18, 2011 at 11:33 AM, Ali Asghar Toraby Parizy <
aliasghar.tor...@gmail.com> wrote:

> Hi.
> As I was writing a php code last week, I struggled with a function that was
> supposed to convert Unicode code to a character. At last I wrote this
> function:
>
> function unicodeToChr($param) {
>
>$a =json_decode('{"t":"'.$param.'"}');
>
>return $a->t;
> }
>
>
> In this function the $param should be something like '\u0627'. I want to
> know if it's acceptable to use this function? Does exist any better
> solution to do that?
> Thanks.
>


[PHP] Converting a Unicode code to related charachter

2011-12-18 Thread Ali Asghar Toraby Parizy
Hi.
As I was writing a php code last week, I struggled with a function that was
supposed to convert Unicode code to a character. At last I wrote this
function:

function unicodeToChr($param) {

$a =json_decode('{"t":"'.$param.'"}');

return $a->t;
}


In this function the $param should be something like '\u0627'. I want to
know if it's acceptable to use this function? Does exist any better
solution to do that?
Thanks.