Hi All - I'm relatively new to php but i do have a small amount of understanding about it, so please no complicated jargon coz my head will bleed!
I have a php search getting specified info from a mysql db - when the data is returned it echo's out using this code:
$results=array();
$sql=$queryCriteria;
$result = mysql_query($sql,$link) or die('Error: ' . mysql_error());
while($a_row = mysql_fetch_array($result, MYSQL_ASSOC)) array_push($results, $a_row);
if(count($results)){
//DISPLAY THE DATA
foreach($results as $r){
echo('
<div class="post cut alignleft">
<div class="entry">
<div class="double alignleft">
<a href="images/propertypics/'.$r['image_1'].'" rel="gallery">
<img src="images/propertypics/'.$r['image_1'].'" alt="Pic" /></a>
</div>
<div class="sidebar alignright">
<h5>'.$r['address'].'</h5>
<p>'.$r['summary'].'</p>
<h5>£'.$r['price'].' pm</h5>
<a class="morebutton moremd" href="property_lets.php?id='.$r['id'].'">More Info</a>
</div>
</div>
</div>
<br><br>');
}
}else{
echo('Sorry - no results found');
}
Now it works a treat but I need to add in an image resize function that exists on the website which uses this code:
<?php
$image = resize('your_image.jpg',array("w"=>600,"h"=>400));
?>
<img src="<?php echo $image; ?>" alt="Pic" />
I've tried various ways to shoehorn it in but with my limited php skills it's proving a pain.
Any help would be much appreciated!
Thanks in advance.