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

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

COde for a Cc
I'm not receiving $ft as a Cc. Why is that??

$to = "$email";
$headers = "Fr

php code generators
All

Whilst enjoying learning a new language i have come accross a number of free code generat

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

Simple Variable Question
Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it

removing space from the end of a variable
i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0m

Count Session and Trigger Events
I am New in PHP, seeking a method to count logged users by counting the sessions or any …, is

How to pass parameter to tag query?
Hi,
I want to get the value of a tag at a specific time (like 10/27/09 15:29:59), I need to giv

How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

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