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

pass form variables straight to email, no database required?
hello all,

im working on this form...

http://www.adobedayevents.com/project_request/pr

Display thumbnails as square while retaining aspect ratio
I am trying to figure out a way to make an image display as a square, for example 80x80 pixels, when

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

pagination - need help on passing of search query.
Hi, i have been trying for days but couldn't get this sorted out. Would like some professional help

Creating an invoice
Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tie

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

session variables not working anymore
hello,
i use sessions to handle authentication within my site. my host has been changing a lot of

Redistributing dependent dlls
Hai all ,

I have created an application in VC++ using VS2008 in a development machine which r

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