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

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since co

Linked Keywords
I am trying to get a script that makes my predefined keyword converted to links and / or converted t

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Applet JTextField Size Problem
Hello,

I recently started making an applet to calculate certain values for airplanes. However

Display search result
Hi!

I have a SQL database with information about albums and track (music).

This is wh

$variable $variables type question
I need to be able to designate an array element dynamically, so I thought to use a variable variable

Changing color in GD via variable?
Hey guys, I'm new here. x)

I'm very much a noob when it comes to PHP, but I'm trying to learn

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