hi There,
Actually i am working on a project where there r about 30 news on the index page.
i want to change each news and its relative pic dynamically.

$news_pic=$_POST['news_pic'];
$news_no=$_POST['news_no'];
$news_heading=$_POST['news_heading'];

//the target string
$string=
<img src="images/zardari.jpg" alt="" border="0" align="left">
<a href="news/eng1.html"><strong>
Asif asks US to end Afghan infiltration
</strong>

//i need a pattern
$pattern=

$replacement=<<<BEGIN
<img src="images/$news_pic.jpg" alt="" border="0" align="left">
<a href="news/$news_no.html"><strong>
$news_heading
</strong>
BEGIN;

preg_replace($pattern, $replacement, $string)