Tagged Questions
0
votes
0answers
12 views
template issue with str_replace and functions
I am using the following to replace curly bracket markers in .tpl files, sort of a quasi templating engine. I do not really want the overhead of having a template engine when I just need it for these ...
0
votes
1answer
14 views
Cannot get StdClass Array to output single values
I can return nothing by trying to access the array like this:
$title = $response->Items->Item->ItemAttributes->Title;
$ISBN = $response->Items->Item->ItemAttributes->ISBN;
Any Help?
...
0
votes
1answer
34 views
PHP : multiple inputs into other multiple inputs
I using jquery to add / remove inputs
i use append to add multiple Tr for Date / revenue
also i use another append to add multiple td for revenue in same Tr of date
i Add multiple date inputs and ...
0
votes
4answers
23 views
Converting a nummeric array to comma separated string
I have an array like this:
[participants] => Array
(
[0] => 9
[1] => 8
[2] => 12
)
I want to put it in another variable to look like this:
"9,8,12"
I ...
0
votes
1answer
39 views
Merging PHP Arrays for JSON output
I'm having a difficult time trying to get back a single array, which I can then return as JSON.
The Model:
class CoverageLimit extends Eloquent {
protected $table = 'webapp_limit_tbl';
...
0
votes
2answers
26 views
Extract substring from array of strpos values
I have the following string
$string = "Hello World!<br />- 8/7/2013<br />Content<br />- 8/6/2013<br />Hello World";
I want to extract all the information between the dash + ...
0
votes
5answers
51 views
PHP: check if an element belongs to an array
I know PHP 4 and PHP 5 supports a built in function in_array for determining is an element is in an array or not.
But, I am using a prior version of PHP for some reason and wanted to know what is ...
0
votes
1answer
29 views
Copy a PHP array item that contains an object
I would like to copy an array item that contains an object.
$arr = [
'first_item' => [
'label' => 'a',
'date' => new DateTime('1999-12-30')
],
'second_item' => ...
0
votes
5answers
40 views
Array value find using index partial string using PHP
I am having below array. I would like to get the value which is having '1' and the key should be 'wf_status_step%'. How to write a PHP script for this?
[ini_desc] => 31.07 Initiative1
[mea_id] ...
2
votes
1answer
22 views
PHP : array in Format part to sprintf or vprintf
Student of PHP Even Now !
Searched for this but haven't got any answer So posting the Q
i know about
sprintf ( string format [, mixed args])
sprintf Description :Returns a string produced ...
1
vote
1answer
28 views
Can't obtain the desired template for my arrays
I'd like to remove the [0] [and so on] I get with the .php so I can use them separately and create charts using RickShaw librairy.
This is currently the JSON code i get :
Array ( [0] => ...
2
votes
2answers
31 views
PHP - lost reference in object array?
I have an array that stores some Employee Objects
ie.
var $this->employeeArray = array();
$this->employeeArray[] = $empObjectA;
$this->employeeArray[] = $empObjectB;
...
which Employee ...
-5
votes
1answer
53 views
Function expects array to be string, convert?
Before downvoting you can atleast write what is bothering you, jesus christ this arogance
I get "Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in bla bla..." ...
0
votes
4answers
45 views
multiple combinations in an Array
I currently have an array, the amount of items in the array can change. I am trying to find different combinations for the values inside the array, for example the array currently has these values;
...
0
votes
1answer
27 views
Serialize PHP => Unserialize JAVA / Serialize for php in string format
I have an array in php of this format:
<?php
$value = array("id" => 42, "user" => "superman");
echo serialize($value);
?>
Serialized :
a:2:{s:2:"id";i:42;s:4:"user";s:8:"superman";}
...