big-dog1965 Posted March 19, 2009 Share Posted March 19, 2009 How do I write this bit of code so I dont get the error Parse error: syntax error, unexpected T_STRING print "<h2 align="center">Password field cannot be left blank!</h2>"; If I do it this way print "<h2>Username field cannot be left blank!</h2>"; Seems to work but i want it centered Link to comment https://forums.phpfreaks.com/topic/150101-error-in-print-line-of-php-for-centering-text/ Share on other sites More sharing options...
Kalland Posted March 19, 2009 Share Posted March 19, 2009 Try to change this: print "<h2 align="center">Password field cannot be left blank!</h2>"; Into this: print "<h2 align='center'>Password field cannot be left blank!</h2>"; Link to comment https://forums.phpfreaks.com/topic/150101-error-in-print-line-of-php-for-centering-text/#findComment-788297 Share on other sites More sharing options...
big-dog1965 Posted March 19, 2009 Author Share Posted March 19, 2009 That works Thanks Now just to save a thread How would I center this echo 'You are not allowed to access this page.';<br> Link to comment https://forums.phpfreaks.com/topic/150101-error-in-print-line-of-php-for-centering-text/#findComment-788303 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.