PHP - Moved: Text Right And Left In Same Line
This topic has been moved to HTML Help.
http://www.phpfreaks.com/forums/index.php?topic=347272.0 Similar TutorialsThis topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=352028.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=343994.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=342696.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=320409.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=323935.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=317690.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=308347.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=349871.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=330719.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=322864.0 This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=350801.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=346609.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=318213.0 i have a text from the database and i want to echo just the first line , but i dont know the character = new line i tried those (to know the character) : Code: [Select] if(strpos($question['q_text'],'\n')!==false){echo 'yes';} elseif(strpos($question['q_text'],'\n')===false){echo 'no';} if(strpos($question['q_text'],'<br>')!==false){echo 'yes';} elseif(strpos($question['q_text'],'<br>')===false){echo 'no';} if(strpos($question['q_text'],'<br/>')!==false){echo 'yes';} elseif(strpos($question['q_text'],'<br/>')===false){echo 'no';} all of them are No ! This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=347065.0 how can make the text box like line as in the photo
Hi! Basically, I'm making a PHP file that lists things from a file, so if the file contained; '@-Line 1-@@-Line 2-@' it would produce <li><a href="#">Line 1</a></li><li><a href="#">Line 2</a></li>, but I want it so it changes the coding for 1 of every 2 lines. So I've came up with this code: $myFile = "list.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, 100); fclose($fh); $oldtxt = array("@-", "-@"); $newtxt = array('<li><a href="#">','</a></li>'); $newData = str_replace($oldtxt, $newtxt, $theData); $array = explode("</li>", trim($newData)); $lineno = count($array); $linenofinal = $lineno - 1; for($i=1;$i<$linenofinal;$i++){ if(($i % 2)=='0'){ } } The bit that I'm stuck on is inside the if statement. How could I get it to replace for example <li> in line $i with <li class="1in2"> Thanks in advance, Daviga404 =D This topic has been moved to Editor Help (Dreamweaver, Zend, etc). http://www.phpfreaks.com/forums/index.php?topic=355418.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347628.0 Hi guys, I have script which scraps content from web and writes it down in a text file, now everything seems to be okay. Its scraps and writes well but the problem is when i open that text file one weird character keeps coming after some words which i don't know about. I have attached the text file, will you guys please look at it and tell me how to replace that square looking character into new line in text file. |