View Full Version : mobile formats and php code

09-30-2011, 04:53 AM

I have php templates and have been told that if I have those templates in xml and atom formats then my site will work in mobile devices too. However, I do not know how to convert php templates to these formats and did not find anything about them in the net.

I have the following code php code

<?php foreach ($objects as $obj):?>
<div class="obj_title"><?php echo $obj->getTitle();?></div>
<div class="obj_content"><?php echo $obj->getContent();?></div>
<?php enforecah;?>

I need to know how should I translate it to xml and atom formats?

Thanks in advance.

09-30-2011, 11:39 PM
Atom (http://en.wikipedia.org/wiki/Atom_(standard)) is used for RSS almost exclusively. You don't want to change your pages to that unless you are offering some sort of syndication. Mobile devices(smart phones I should say) understand HTML just fine. You may want to adjust your layout for smaller screens, but you don't need to convert to XML for the page to render on a mobile device.