concatenation

Php concatenation of arrays.

I have the next array($columsData): Array ( [avatar] => Array ( [title] => Avatar [sort] => [no_html_escape] => 1 ) [title] => Array ( [title] => Title [sort] => ) ) And how can i make this array like this: Array ( [id] => Array ...

Problem with quotes in "onlick" function

Hey Guys, I'm trying to concatenate PHP variables into an "onclick" function. Here is the line I'm having trouble with (look for the "onclick" part): $imagecontent = '<div class="imagensfw" id="image'.$id.'" style="width:'.round($wd).'px;height:'.round($ht).'px;" onclick="viewimage(image'.$id.','.round($wd).','.$url.');"><p>Image</div...

Concatenate two variables to obtain one.

Hi all, How to concatenate two variables to obtain something like this? $var = "sss"; $i = 5; ${$var.$i} = "eeee"; // I know this is not correct, What should be here echo $var5; So here i need to obtain variables $var1 $var2 $var3 $var4 ... dynamically. ...

How to manipulate strings with x86 assembly?

I'm in the process of writing an assembly program that takes two strings as input and concatenates them. Here's what I have: (using NASM syntax) SECTION .data hello: db "Hello ",0 world: db "world!",0 SECTION .text ; do the concatenation Since I've never done any work with strings in x86 assembly before, I need to know how...

Add before and after the string

$variable = 'for linebreak add 2 spaces at end'; Value of this variable everytime changes. How to add some text or html before and after this string? E.g. if we want to add '<div>' before and '</div>' after, string should look like: $variable = '<div>for linebreak add 2 spaces at end</div>'; ...

PHP string concatenation problem?

function formatUpdate($tweet,$dt,$picture,$username) { if(is_string($dt)) $dt=strtotime($dt); $tweet=htmlspecialchars(stripslashes($tweet)); $at = "@" . $username; return' <li> <a href="nano.com/' . $username . '"><img class="avatar" src="images/' . $picture . '" width="48" height="48" alt="avatar" /></a...

Parse Error - Concatinating string PHP

Hi, I am trying to concatinate the following: (I'm just including snippets of code to demonstrate where the variables are coming from) $realexdate = date('Ymdhis', strtotime($date)); $currency = "EUR"; while($row = mysql_fetch_array($sql2, MYSQL_ASSOC)) { $cost_record = $row['cost']; } while($row = mysql_fetch_array($sql4, MY...

Why does this code produce "syntax error, unexpected '='" ?

$text . = '1 paragraph'; $text . = '2 paragraph'; $text . = '3 paragraph'; echo $text; This code gives error syntax error, unexpected '='. What is the problem? ...

PHP Parse error: syntax error, unexpected T_CONCAT_EQUAL

$XMLFormatedString .= "<Filter id='" .= .$row->id. .="' name='" .= .$row->label. .="'><Label>" .= .$row->label. .="</Label></Filter>"; ...

Is it possible to convert an array of strings into one string?

In my program, I read in a file using this statement: string[] allLines = File.ReadAllLines(dataFile); But I want to apply a Regex to the file as a whole (an example file is shown at the bottom) so I can eliminate certain stuff I'm not concerned with in the file. I can't use ReadAllText as I need to read it line by line for anothe...

How can I concatenate ranges of numbers into an array in MATLAB?

For example, I want to combine two ranges of numbers like this: 1 2 3 4 5 11 12 13 14 15 16 17 18 19 20 So, I tried: a = 1:5,11:20 but that didn't work. I also want to do this in a non-hardcoded way so that the missing 5 elements can start at any index. ...

[SYBASE] SQL query for "concatenate on join"

NOTE: I'm still looking for an answer that I can accept. Hi, I'm using a Sybase ASE database. I have two tables that look like: Table Shops: --------------------- | ShopName | ShopID | --------------------- | Sweetie | 1 | | Candie | 2 | | Sugarie | 3 | --------------------- Table Sweets: --------------------...

JQuery Formatting Issue

I can't get this to work for the life of me. The URL concat messes up. The answer doesn't seem obvious... function(data){ $('#dataDisplay').prepend("<img src='http://url"+data+"moreurl' />").fadeIn("slow"); }); Firebug throws missing end argument errors. ...

PHP Shorthand for Pre-Concatenation?

I've been programming in PHP for years, and I've always wondered if there is a way to 'pre-concatenate' a string. Example: $path = '/lib/modules/something.php'; $server = $_SERVER['DOCUMENT_ROOT']; I've been doing this for years in order to append a value to the beginning of a string: $path = $server . $path; // returns: /home/somesi...

possible to concatenate a word with DIFFERENT font in dynamic text field? AS3/Flash

I have a submit button that I'm pulling in from XML. It needs to be XML because it is translated. Therefore... the length is varying depending on the language. I simply want to add an arrow to the end of the word using Webdings #4 (it looks like a solid arrow, not like > but solid)... Is this the best way to do this? What are my opti...

problem in showing correct mysql concatenation

hey guys i have two mysql tables which are linked together and i need to show my category list table_stories sid || title || time || hometext || associated 1 || test || 2010-07-19 || text---- || 8-14- table_topics topicid || topicname || slug 1 || car || car 4 |...

How to concatenate row values for use in WHERE clause of T-SQL query

I want to write a query in T-SQL to perform a search on two concatenated columns. The two columns are fname and lname. Here is what I have so far: SELECT fname, lname, ... FROM users JOIN othertable ON foo=bar WHERE fname+' '+lname LIKE '%query%' SQL server doesn't like that syntax, though. How do I structure t...

How inefficient is String concatenation in Javascript?

Such as var myName = 'Bob'; myName += ' is a good name'; For long operations of this, it there a better way to do it? Maybe with a StringBuffer type of structure? Thanks! :) ...

how to put GROUP BY correctly?

How to use grouping correctly in this query: $sQuery = "SELECT id,DATE(A.Inspection_datetime) AS Date, A.Model, COUNT(A.Serial_number) AS Qty, B.name FROM inspection_report AS A LEFT JOIN Employee AS B ON A.NIK=B...

How should i modify this SQL statement?

My SQL Server view SELECT geo.HyperLinks.CatID, geo.Tags.Tag, geo.HyperLinks.HyperLinksID FROM geo.HyperLinks LEFT OUTER JOIN geo.Tags INNER JOIN geo.TagsList ON geo.Tags.TagID = geo.TagsList.TagID ON geo.HyperLinks.HyperLinksID = geo.TagsList.HyperLinksID WHERE HyperLinksID = 1 returns these... HyperLinksID...