hey,
I want to concat whole bunch of strings together but somehow they don't turn out the way I want them to
a="HELLO "
b="WORLD "
c=$a$b
I was expecting c to be "HELLO WORLD " but it... (1 Reply)
Hello,
I have a list of tablespaces in oracle and I want to concatenate 'drop tablespace' on the left of each line and 'INCLUDING CONTENTS AND DATAFILES' on the right of each line.
Any idea how to do that?
many thanks.
PS: I tried to use excel and copy/paste it to vi. But I noticed many... (1 Reply)
Hello Unix gurus,
how to concat 3 files content side by side .
i have 3 files
more report1.txt
select *from tab1 A JOIN tab1 B ON
more report2.txt
A.PK1=B.PK1 where
more report3.txt
A.AAA <> B.AAA or
A.BBB <> B.BBB or
A.CCC<> B.CCCC or
..
..
..
A.ZZZ <> B.ZZZ;
if i concatinate... (3 Replies)
Hello,
I have a file with two fields in the following format..
NewYork|Rob
Boston|Mellisa
NewYork|Kevin
Boston|John
Chicago|Mike
Boston|Tom
My output should be:
NewYork|Rob,Kevin
Boston|Mellisa,John,Tom
Chicago|Mike
Basically I need to rollup on column A and stringconcat column... (5 Replies)
Hi Folks
The below is code is giving me value 30.
cal | sed '/^$/d' | tail -1 | awk '{printf $NF-1}'
Actually the text is like below.
echo "you should reply on 30-Jan-2013 evening EST.
Here how should i con-cat above logic in that text? (1 Reply)
Hello All,
I have a file with following data.
1365787116 3.0 contracts/Procs_Val_Req_forContrct_Amnd_BPEL
1348791394 2.0 contracts/Procs_Val_toTerm_Ret_Contrct_BPEL
1348791394 2.0 contracts/Qualfy_BP_forNew_Ret_Contrct_BPEL
1348791394 2.0 ... (8 Replies)
Hi,
I need help to combine the first 7 character of firstname if it is longer than 7and combine with the first character of lastname.
ex: username lastname => usernaml
user lastname => userl
Thanks in advance. (10 Replies)
Discussion started by: xitrum
10 Replies
LEARN ABOUT PHP
is_scalar
IS_SCALAR(3) 1 IS_SCALAR(3)is_scalar - Finds whether a variable is a scalarSYNOPSIS
bool is_scalar (mixed $var)
DESCRIPTION
Finds whether the given variable is a scalar.
Scalar variables are those containing an integer, float, string or boolean. Types array, object and resource are not scalar.
Note
is_scalar(3) does not consider resource type values to be scalar as resources are abstract datatypes which are currently based on
integers. This implementation detail should not be relied upon, as it may change.
Note
is_scalar(3) does not consider NULL to be scalar.
PARAMETERS
o $var
- The variable being evaluated.
RETURN VALUES
Returns TRUE if $var is a scalar, FALSE otherwise.
EXAMPLES
Example #1
is_scalar(3) example
<?php
function show_var($var)
{
if (is_scalar($var)) {
echo $var;
} else {
var_dump($var);
}
}
$pi = 3.1416;
$proteins = array("hemoglobin", "cytochrome c oxidase", "ferredoxin");
show_var($pi);
show_var($proteins)
?>
The above example will output:
3.1416
array(3) {
[0]=>
string(10) "hemoglobin"
[1]=>
string(20) "cytochrome c oxidase"
[2]=>
string(10) "ferredoxin"
}
SEE ALSO is_float(3), is_int(3), is_numeric(3), is_real(3), is_string(3), is_bool(3), is_object(3), is_array(3).
PHP Documentation Group IS_SCALAR(3)