css - Adding space to `echo`ed result -


here have code in php echoes out number of followers, result displayed under followers wrapped in h2 tags in start of line i.e, under fo, want display numbers in center under followers adding several &nbsp echo mysqli_num_rows($resultfollowers); work 1 word alternative rather typing several &nbsp

<h2>followers</h2> <?php $checkfollowers = "select * follow_user user_id='$user_id'"; $resultfollowers = mysqli_query($con,$checkfollowers); echo mysqli_num_rows($resultfollowers); ?> 

yes. use css set width container , use text-align: center; center text.

visual presentation has nothing mysql or php.

example inline styles:

echo sprintf( '<p style="width: 20em; text-align:center;">%s</p>', $resultfollowers ); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -