Jump to content

[SOLVED] How to set align in a statement?


pcjames

Recommended Posts

Hi All, another newbie question here!

 

I've managed to get my statement working without breaking my script, but for the life of me I can't figure out how (or if it's poss) to make the 2nd part of my statement to align right.

 

My complete statement below

 

 if(mysql_num_rows($reviews_query) > 0) {
  $info_box_contents[][0] = array('align' => 'left',
                                  'params' => 'class="Info" valign="top"',
			  'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>' . '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_all_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>' );
}

 

In the line below is where I'm trying to get the 2nd part to align right

 

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>' . '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_all_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>' );

 

This part of the code is what I'm trying to get align right

 

'<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_all_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>' );

 

Thanks in advance for any help, James

Link to comment
https://forums.phpfreaks.com/topic/56749-solved-how-to-set-align-in-a-statement/
Share on other sites

Thanks cooldude832,

 

I knew it was HTML I just didn't know how to include it in my statement and although your reply wasn't exactly what I was looking for it sure got the wheels turning inside my head which resulted in me solving my issue. So Thanks Great Job!

 

In case someone else wants to know I'll include the code in what I was trying to achieve.

 

</td>' . '<td align="right"><a href="

 

I'm still new to php and still don't know how the <td> is created in the statement but when I viewed the page source I seen my statement was within a < td > Therefore I included a closing < /td > and started a new < td > and added my alignment and it worked like a charm.

 

Thanks again cooldude832! James

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.