It make me hurt, I can place a string(I don't know the name, it started with $) in quotes. by default, it looks like this: $name = 'aandamar'; Code (markup): I want to make it like this $myname = 'aandamar'; function showname { $name = '$myname'; } Code (markup): my ig question, how I can export the $myname in showname function with the quotes? I try like above but can't see it works. hopefully there someone can help me out with this problem. thanks
// #1 $name = '"' . $name . '"'; // #2 $name = "\"$name\""; PHP: Choose the one that suits the best to you.
<?php function showName($name) { echo "\"$name\""; } showName("Michael"); ?> PHP: "Michael" Code (markup): What exactly does not work for you ?
thanks mate for the help. this exactly the problem, the $problem is get the text from theme setting and then insert it on the rewrite. $problem = $mnl_settings['searchbase']; function ubah_searchbase() { $GLOBALS['wp_rewrite']->search_base = '$problem'; } Code (markup): by default, wp rewrite using normal text that is search. function ubah_searchbase() { $GLOBALS['wp_rewrite']->search_base = 'search'; } Code (markup): how I can add $problem in it? thanks
it works, but giving other problem that make I can't sleep as you can see, on http://www.carownersmanualonline.com/, try to search something. the search base is go with the search term.