| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) | ||||
| Senior Member Join Date: Oct 2006 Location: http://akshayjain.org
Posts: 2,830
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | need help with preg match hi i suppose i have some raw data in the form
please tell me what code i should use for that? | ||||
| |
| | #2 (permalink) |
| NamePros Member Join Date: Apr 2005
Posts: 117
![]() ![]() | if that data is stored in the variable $string... Code: $lines=file($string);
foreach($lines as $line){
if(substr($line,0,5)=="name:"){
$answer=substr($line,6);
}
}
echo($answer); |
| |
| | #3 (permalink) |
| Buy my domains. Join Date: Feb 2006
Posts: 2,796
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | PHP Code: |
| |
| | THREAD STARTER #4 (permalink) | ||||
| Senior Member Join Date: Oct 2006 Location: http://akshayjain.org
Posts: 2,830
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
thanks a lot | ||||
| |