Jump to content

ajrocha81

New Members
  • Posts

    4
  • Joined

  • Last visited

ajrocha81's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ummm lol nevermind i already know why each image was going in each line i just removed the <br> and </n> in the output and solved it. sorry i am very very blind
  2. wow i am amazed at this code....... small simple and yet powerful. your use of ctype_alpha and str_split is very new to me and and i now see why an array wasn't needed in this example. i sampled the code and im beginning to understand the logic of this code... the images get displayed from the input, although its from top to bottom in every new line instead of left to right, but im gonna work on that. i am new at this and i am aiming to become a php/web programmer. LOLOL but seeing this code so i have got a looooong way to go. Thank you.
  3. Hi, I changed the $string to $char which was the problem, but it is still not seeing full texts. It would see single letter inputs (like a, b, c) on its own but not full words (like tony or alphabet). Am i still missing something,is using the array this way a bad idea???
  4. the idea on what im doing is like a converter, like showing what your name would look like with certain images per letter, when you input text (your name for example) and when you press the submit button you would get a series of images in a row that represent each character that you typed. here is the example that i did... <html><?php if(isset($_POST['Translate'])) {$image = array( 'a' => 'a.png', 'b' => 'b.png', 'c' => 'c.png', );$char = $_POST["ConvertEng"];for ($i=0; $i<strlen($string); $i++) {?>Character: <?php echo $char[$i]; }?><br /><br /><img src="<?php echo $image[$char]; ?>" alt="Images for the '<?php echo $char ?>' character."/><br /><br /><?php } ?> <p style="text-align: center;"> <form action='convert.php' method ='POST'><table border="2"><tr><td>Convert English into images :</td><td><input type="text" name="ConvertEng" size"20"></input></td></tr></table><input type="submit" name = "Translate" value = "Translate"></form> <p></html> so far this works on 1 character 1 image only , BUT how would i correct this coding by getting the whole text(more than 1 character in the inputed text) into their correct sequence of images...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.