wesley Posted September 22, 2015 Share Posted September 22, 2015 Hello, Can anyone tell me how I create a for loop which incurs a sentence of 10 pixels to 100 pixels? So the word sentence font-size from 10 to 100 px. for ($x = "sentence"; $x "font-size" ; $xxx) { echo "$x <br>";} thanks in advance. Link to comment Share on other sites More sharing options...
Ingolme Posted September 22, 2015 Share Posted September 22, 2015 Something like this: $sentence = 'Hello, world!';for($i = 10; $i <= 100; $i++) { echo "<span style="font-size: {$i}px">$sentence</span><br>";} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now