[PHP] Re: How To Do This?

2004-05-22 Thread Aidan Lister
Hi Justin, For future reference, your choice of subject is poor - be more descriptive, your subject could apply to 99% of the questions asked on this list. I have no idea what you've created in DW MX 2004, nor have you given us any information about it. If you have an authorisation level stored

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Aidan Lister
I don't understand the question. One should always check the existence of something before attempting to use it. If (isset($var) gettype($var) == boolean) is one way of type checking. Christian Jul Jensen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi In PHP5 the behaviour

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Red Wingate
Hi, this is a plain design fault on your side: ?php $a = 'this is not an array'; if( is_array( $a['foo'] ) ) print '1'; [...] ? allright, just set $a to be a string, thats allright, now you check wether an string-offset ( foo ) is an array or not which causes an FATAL

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Christian Jul Jensen
Hi Thanks for taking time to look into this. [EMAIL PROTECTED] (Red Wingate) writes: this is a plain design fault on your side: I'm sorry, but I don't agree. It is standard in PHP4, and one of the advantages of having a type loose programming language. Now this makes sense as you first

Re: [PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Curt Zirzow
* Thus wrote Christian Jul Jensen ([EMAIL PROTECTED]): Hi Thanks for taking time to look into this. [EMAIL PROTECTED] (Red Wingate) writes: this is a plain design fault on your side: I'm sorry, but I don't agree. It is standard in PHP4, and one of the advantages of having a

[PHP] Re: How to do this? 6 lines of code...Parse error

2004-01-03 Thread Aidan Lister
Firstly I'd rewrite your other script to store the data in an array. The benefits of doing so are simply demonstrated: ?php foreach ($products as $product) dosomethingto($product); ? However, if you are unable to rewrite your script: The correct syntax is: ?php ${'product' . $i} ? Ryan A

Re: [PHP] Re: How to do this? 6 lines of code...Parse error

2004-01-03 Thread Ryan A
Hey, OK, got it, thanks! -Ryan On 1/4/2004 1:00:04 AM, Aidan Lister ([EMAIL PROTECTED]) wrote: Firstly I'd rewrite your other script to store the data in an array. The benefits of doing so are simply demonstrated: ?php foreach ($products as $product) dosomethingto($product); ?