| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | The problem is: I have html-php codes stored in mysql as strings... I query mysql and i obtain some variables like these: $str_phpcode1 = "<div><?php echo "Hello world"; ?></div>"; $str_phpcode2 = "<span><?php func_loan(); ?></span>"; ... Obviously if I write echo $str_phpcode1; or echo $str_phpcode2; the strings will be printed as text and the "echo" and "func_loan()" are not executed as php code. Is there a solution? Thank you Resolved: eval("?>".$str_phpcode1."<?php "); |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |