MOSTAGHASSI
asked on
How can i modify this custom function in php?
Hello;
I have this function and it works
But i want change it to have one <div> with 3 raws(one for Title,one for image,and one for title description) as below,appreciate that let me know is it possible and how?
Because when i want apply 'float' i can.
I have this function and it works
<?php
$tab = "<div class='articletitle'>";
$tab .= "<a href='./$folder/$file?articleid=$articleid&parentid=$parentid&catid=$catid'><strong>$title$audioicon
</strong></a></div>";
$tab .= "<div class='mimage'>";
$tab .= "<a href='./$folder/$file?articleid=$articleid&parentid=$parentid&catid=$catid'>
<img src='./images/mimage/$photo' border='0' alt='$altdescription' /></a><br/>";
$tab .= "<span class='span_class'>$description1... </span></div><hr class='hr95'>";
return $tab;
}
$tab = "";
?>
But i want change it to have one <div> with 3 raws(one for Title,one for image,and one for title description) as below,appreciate that let me know is it possible and how?
Because when i want apply 'float' i can.
<div class="wrapper">
<div class="row1">for title</div>
<div class="row2">for image</div>
<div class="row3">for small description</div>
</div>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you post the question in the PHP Zone I will almost certainly see it!
Thanks for the points and thanks for using E-E, ~Ray
Thanks for the points and thanks for using E-E, ~Ray
ASKER
Hi Ray;
Is it possible for you that have a look on this question/thanks:
This question is regarding the calling of function that you solve it above:
I want call this function so arrange it in 2 columns and 4 rows as:
block1 block2
block3 block4
block5 block6
block7 block8
each block is calling the function with new data,something like this below(it call 8 times the function but not arrange right) that don't arrange in div that the calling happen:
-function doArticle_image300_artandc ulture() is the mosta() function.
-The codes below is just for the things that is in my mind,and want to show what i want.
Is it possible for you that have a look on this question/thanks:
This question is regarding the calling of function that you solve it above:
function mosta()
{
// CREATE A RETURN STRING IN HEREDOC NOTATION
$tab = <<<EOD
<div class="wrapper">
<div class="row1">for title</div>
<div class="row2">for image</div>
<div class="row3">for small description</div>
</div>
EOD;
return $tab;
}
I want call this function so arrange it in 2 columns and 4 rows as:
block1 block2
block3 block4
block5 block6
block7 block8
each block is calling the function with new data,something like this below(it call 8 times the function but not arrange right) that don't arrange in div that the calling happen:
-function doArticle_image300_artandc
-The codes below is just for the things that is in my mind,and want to show what i want.
$result_artandculture = mysql_query($query_artandculture);
if ( $result_artandculture) {
$i = 1;
for ( $i=1 ; $i<=4; $i++){
$rw = @mysql_fetch_assoc( $result_artandculture);
$new= doArticle_image300_artandculture( $rw['articleid'], $rw['title'], $rw['description1'], $rw['photofilename'], $rw['parentid'], $rw['catid'],$rw['mediastate'],$rw['altdescription']);
echo "$new";
if ( $rw = @mysql_fetch_assoc($result_artandculture ) )
$new=doArticle_image300_artandculture( $rw['articleid'], $rw['title'], $rw['description1'], $rw['photofilename'], $rw['parentid'], $rw['catid'],$rw['mediastate'],$rw['altdescription']);
echo "$new";
}
}
ASKER
Sorry,i dont know that why the link of question disappered,
https://www.experts-exchan ge.com/que stions/289 60780/Call -custom-fu nction-in- php-and-ar range-data -as-attach -file.html
https://www.experts-exchan
ASKER
In addition i have another question(tomorrow send on experts-exchange) regarding the call of this function to my program,how can i access you for that?
Thanks for your article also.