PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The only thing to be aware of is that str_pad will count as 6 characters long when working out the pad so the second variable (102 in this example) needs to be set at 6 times the number of spaces you want (in this case 17).
You can also use this directly with a string field by replacing the first variable (" ") in my example with a variable or a text string
This functions returns the input string padded on the left, the right, or both sides to the specified padding length. If the optional argument pad_string is not supplied, the input is padded with spaces, otherwise it is padded with characters from pad_string up to the limit.
Seriously I am fairly new to php, but I have a fair amount of experience in another programming language - Progress OpenEdge 4GL, so I tend to approach most problems with how would I solve them using Progress, and then try and find a PHP equivalent - fortunately on this occasion there was a close equivalent.
now all I have to do is to get my head fully around multidimensional arrays in php and I'll get on much faster
The only thing to be aware of is that str_pad will count as 6 characters long when working out the pad so the second variable (102 in this example) needs to be set at 6 times the number of spaces you want (in this case 17).
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.