You are here: Re: Help with ? and : « All PHP « IT news, forums, messages
Re: Help with ? and :

Posted by Martie on 09/28/61 11:47

On 10 May 2006 08:35:27 -0700, kenoli wrote...
>
>Thanks -- That's clear. So, when can one simply insert perl or c code
>into php code and expect it to work? I doubt it this can be done with
>impunity. How can one know when this can be done?
>
>Is this also php code and, if so, why isn't it documented at php.net?
>
>I've searched far and wide on php.net and other sites and found
>nothing, though I've also noticed that the search engine at php.net
>misses more than it finds.
>

Perl, PHP and other program languages have many similarities. Many use
variables, arrays, loops and have other similar characteristics. While some of
their syntax may be identical, not all of them are.

There's also normally more than one way to program something, so while you may
use the "? :" (whatever it's called)...

$var = ($arr1 === $arr2) ? '' : 'not';

...other people might use an if loop instead, if they've never seen or used "? :"
before...

if($arr1 === $arr2){
$var = '';
}else{
$var = 'not';
}

While the php.net site is very helpful, a good manual is also a nice supplement.
Especially if they include examples to test out yourself and get more familiar
with the programming language.

Martie


--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация