473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

joining string

I'm new to php and have read the implode statement on php.net but I
guess I still don't understand it. Below is what I have:

$value = implode($disp_cap," - ",substr($value,0,300));

$disp_cap = Office Space
$value = 3,000 sq.ft. located at the intersection of...

I need the $value to join the two so I would get
Office Space - 3,000 sq.ft. located at the...

I get the error:
Warning: Wrong parameter count for implode() in
/home/GQ/public_html/bb/test.php on line 92

Thanks,
Chris

Jul 17 '05 #1
4 1536
$a = "Hello";
$b = "world";
$c = $a." ".$b;

echo $c;

"Hello World"

Is that what you want to do? Use the . "dot" to concat strings.

Jul 17 '05 #2
I think maybe you want to do this:

$value = $disp_cap." - ".substr($value,0,300);
<so**********@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'm new to php and have read the implode statement on php.net but I
guess I still don't understand it. Below is what I have:

$value = implode($disp_cap," - ",substr($value,0,300));

$disp_cap = Office Space
$value = 3,000 sq.ft. located at the intersection of...

I need the $value to join the two so I would get
Office Space - 3,000 sq.ft. located at the...

I get the error:
Warning: Wrong parameter count for implode() in
/home/GQ/public_html/bb/test.php on line 92

Thanks,
Chris

Jul 17 '05 #3
*** so**********@yahoo.com wrote/escribió (6 Jun 2005 23:35:02 -0700):
$value = implode($disp_cap," - ",substr($value,0,300)); Warning: Wrong parameter count for implode() in
/home/GQ/public_html/bb/test.php on line 92


http://www.php.net/implode

As you can see, implode() does _not_ have three arguments.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #4
<so**********@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'm new to php and have read the implode statement on php.net but I
guess I still don't understand it. Below is what I have:

$value = implode($disp_cap," - ",substr($value,0,300));

$disp_cap = Office Space
$value = 3,000 sq.ft. located at the intersection of...

I need the $value to join the two so I would get
Office Space - 3,000 sq.ft. located at the...


I think simple concatenation would be better for what you want to achieve:

$finalString = $disp_cap . " - " . $value;

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joe | last post by:
I've got 3 columns in a mysql database that I am trying to join. I'm using CONCAT(), but it's giving me NULL results. This has worked for me before ... What am I doing wrong? Here's a straight...
4
by: Job Lot | last post by:
Is there anyway of Joining two or more DataTable with similar structure? I have three DataTables with following structures Data, AmountB/F, Repayments, InterestCharged and AmountC/F i want...
1
by: lorenzobaldan | last post by:
I'm a complete vb newby and I'm trying to make one action button to execute two different queries at the same time. I create two different buttons with the wizard and now -i have to merge them in...
9
by: Eric Sabine | last post by:
Can someone give me a practical example of why I would join threads? I am assuming that you would typically join a background thread with the UI thread and not a background to a background, but...
2
by: Wally | last post by:
Dim var1 as String Dim var2 as String var1="message1" var2="message2" how do I join the two string variables?
1
by: s99999999s2003 | last post by:
hi i have some databse results that are NoneType and DateTimeType. now i have trouble joining these row results together like "|".join(result) as it says cannot join NoneType , DateTimeType . How...
2
by: Supermansteel | last post by:
I am joining these 2 tables together in Access 2003 and can't figure out the exact way of writing this script......Can anyone help? I have the following SQL: SELECT...
1
by: yuva | last post by:
"Thank you for this amazing program. Within a weekend, my team increased with 50 new people joining. Every time I logged on there was a new affiliate. Absolutely amazing. " S. Horvath SOUTH AFRICA...
7
by: sam.barker0 | last post by:
Hi, I tried to use the java approach to join 2 strings int w=0; string z="blah " + w + "blah " but this gives me an error but this works string z("blah"); z+=w;
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.