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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.