Getting PHP variables to display fixed length



Hello,
I am coding a menu using PHP. Selections on the menu have code like :

<li> <a href="Updatefindatesedit.php">$fin_name1 $fin_date1 </a></li>
<li> <a href="Updatefindatesedit.php">$fin_name2 $fin_date2 </a></li>
etc


My problem is the $fin_name1 variables can be anywhere from 1 - 20
characters

so my menu items come out looking like
Joe 2000/01/01
Fred 2001/01/02
Alexander 2001/01/03

Can I get the $fin_name* variable to take up a fixed amount of space
when displaying? My idea is to use strlen on fin_name and put a number
of &nbsp's between, but that sure seems like a dumb way to do it. I
figure someone with more knowledge can tell me an easier way to do
it....
TIA
Japhy

.



Relevant Pages

  • Re: [PHP] Preventing SQL Injection/ Cross Site Scripting
    ... It's a shame that so many PHP installations have them enabled, and a huge disappointment that PHP is actually distributed with this stuff enabled! ... encoding data for output to an HTML document. ... characters into 5, 6, or 7-byte strings, if you already provided the correct character set in the Content-Type HTTP header. ... For anything that gets written to a database or used for a query, I suggest escaping the data using a function specifically designed for that database. ...
    (php.general)
  • Re: [PHP] Preventing SQL Injection/ Cross Site Scripting
    ... It's a shame that so many PHP ... encoding data for output to an HTML document. ... characters into 5, 6, or 7-byte strings, if you already provided the ... anything that gets written to a database or used for a query, ...
    (php.general)
  • Re: Where to declare Variables
    ... cares about making code happy. ... This format, and the whole internet as far as that goes, offers a great deal of anonymity and allows them to post their opinions without regard to actually backing it up with experience as far as could be proven. ... We all come using PHP for different reasons and different ways. ... I have been coding in PHP for almost 15 years, but that says nothing about my experience. ...
    (comp.lang.php)
  • Re: determine default filename encoding
    ... > Suse tech support for the way filename characters are represented, ... Characters are characters - just bytes. ... Then if that coding differed from the LANG coding ... filenames that were written in encoding X as they were written, ...
    (comp.os.linux.setup)
  • Re: refactor + help
    ... I'm was messing around with PHP today and I wrote a tiny app that asks ... If your zipcode is less than 5 characters, ... it asks you too enter a zip code with the proper amount of characters. ... the page is sent to the client. ...
    (comp.lang.php)