You are here: Re: Use of isset () in a string variabel « PHP Programming Language « IT news, forums, messages
Re: Use of isset () in a string variabel

Posted by Bert on 05/10/05 15:45

On 10 May 2005 01:08:44 -0700, "Brian Olivier" <brian@olivier.com>
wrote:

>Hello,
>
>The first option is what I want, but the fact that I can't put code in
>the curlies in a string is what I wanted to know. I was hoping for a
>smart string, but I will program the intelligence outside of the
>string!

you can do this:

<?php
echo(isset($_POST['name']))?'<br>':'';
?>

if $_POST['name'] is set, a <br> will be echoed, if it is not, nothing
will be echoed

hth,
B.

 

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

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