azab20007 Posted January 28, 2008 Share Posted January 28, 2008 I have data in table like this nameeeeeeeeeeeeeeeeeeeeeeeee................eeeeeeeeeeeeee..........................eeeeeeeeeee............................. using this function str_pad($row_Recordset1['name'], 40 ,".",1) ; to unify end all rows But i can't get it is there any solution to this problem ---------------------------------------------- I hope that there's anyone can understand me Quote Link to comment https://forums.phpfreaks.com/topic/88190-i-need-help/ Share on other sites More sharing options...
trq Posted January 28, 2008 Share Posted January 28, 2008 I think you want.... <? echo substr($row_Recordset1['name'],0) . '...'; ?> or similar. Quote Link to comment https://forums.phpfreaks.com/topic/88190-i-need-help/#findComment-451229 Share on other sites More sharing options...
rhodesa Posted January 28, 2008 Share Posted January 28, 2008 You are using the function correctly. str_pad will return the padded version of $row_Recordset1['name']. But you need to post the rest of your script if you want help determining the problem. Note: If you post code, please put it in code tags by using the # button on the toolbar Quote Link to comment https://forums.phpfreaks.com/topic/88190-i-need-help/#findComment-451232 Share on other sites More sharing options...
azab20007 Posted January 28, 2008 Author Share Posted January 28, 2008 thanx thorpe , but i think that i can't explain the problem thanx rhodesa and i will explain the script i need the rows that i get from data base in this form Name eeeeee.... eee......... eeee....... but i can't get it Quote Link to comment https://forums.phpfreaks.com/topic/88190-i-need-help/#findComment-451256 Share on other sites More sharing options...
rhodesa Posted January 28, 2008 Share Posted January 28, 2008 those all have different lengths. if you want them to line up perfectly, you need to use a font where every character has the same width like Courier New Quote Link to comment https://forums.phpfreaks.com/topic/88190-i-need-help/#findComment-451261 Share on other sites More sharing options...
azab20007 Posted January 28, 2008 Author Share Posted January 28, 2008 thaaaaaaaaaaaaaaaaanx thaaaaaaaaaaaaaaaaanx thaaaaaaaaaaaaaaaaanx Quote Link to comment https://forums.phpfreaks.com/topic/88190-i-need-help/#findComment-451314 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.