Sjoerd Maessen blog

PHP and webdevelopment

Archive for the ‘format’ tag

PHP alternative, lazy syntax

without comments

Alternative, lazy what?

Consider the next example:

  1.  
  2. < ?php foreach($aNewsItems as $oItem) {
  3.      echo ‘<li>’;
  4.      echo ‘<a href="/news/’.$oItem->id.‘-‘.$oItem->rewrite.‘.html">’.$oItem->title.‘</a>’;
  5.      echo ;
  6. } ?>
  7.  

We could write the above like this: Read the rest of this entry »

Written by Sjoerd Maessen

April 12th, 2010 at 7:22 pm

Posted in syntax

Tagged with ,