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:
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

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

help with this code please?
Hello,

I am trying to build a remote upload script for my image hosting site.

I am usi

How do I replace any number of character occurences with one occurrence?
How do I replace any number of character occurences with one occurrence?

Let's say I have:

Warehouse Management
Hi,

On our system, we have two storage locations ( A and B ) where A is the main factory

Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to

Remove directories not empty
hi,
i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.<

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Any meaningful project for a new C++ programmer?
I want to do some meaningful program, so I can help myself to learn

Assume I know the fol

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