insert PHP code into function


Posted on 16th Feb 2014 07:03 pm by admin

Hi,
I'm having problems when trying following:

I have:
Did you know?Explore Trending and Topic pages for more stories like this.
Code: [Select]createBar("Download: <b>$kwd</b><Br />", "100%")
and I'm trying to display following after $kwd:
Code: [Select]if(count($info['results']))
print '<div align="center" class="info"><b>'.$info['total_results_count'].'</b> results found, page '.$info['curpage'].' from '.$info['total_pages'].'</div>';

I replaced all double " by /" but this doesn't seems to work.
Code: [Select]createBar("Download: <b>$kwd</b> if(count($info['results'])) print '<div align="center" class="info"><b>'.$info['total_results_count'].'</b> results found, page '.$info['curpage'].' from '.$info['total_pages'].'</div>'<Br />", "100%")
I'm getting following error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
No comments posted yet

Your Answer:

Login to answer
315 Like 24 Dislike
Previous forums Next forums
Other forums

Bandwidth monitoring?
Hi guys,

I need a little information I have written a php app and I occurred to that I need

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),

a u

Help with syntax
Hi all!

The $bridge variable is not getting passed while it is contained in the line below:

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

News script
Hi ...

I am not sure if this is the rite place to post this but if its not sorry

i am

php redirecting
i wont open a new thread but i have a question about redirecting....
i wonder why my code doesnt

Session problem?!?
Hello All! I am very new to the php world but I am working on fixing things that a previous programm

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash