spadez
02-09-2010, 11:19 AM
Im using a PHP variable to define a span tag. However, the spaces in the php varaible seem to be causing problems with the span tag, so I was wondering if anyone can tell me a way to clip the variable down to the first 3 letters and use that.
For example, variable1=HELLO WORLD, variable2=HEL
Here is my HTML:
<a href="#" class="buttonx"><span class="<?php echo $_product->gettesting() ?>">This item is <?php echo $_product->gettesting() ?></span></a>
Can someone explain to me in idiot proof steps what I need to do?
For example, variable1=HELLO WORLD, variable2=HEL
Here is my HTML:
<a href="#" class="buttonx"><span class="<?php echo $_product->gettesting() ?>">This item is <?php echo $_product->gettesting() ?></span></a>
Can someone explain to me in idiot proof steps what I need to do?