Talk:Associative array/Creation: Difference between revisions

m
moved Talk:Associative arrays/Creation to Talk:Associative array/Creation: Named to match Associative array page
No edit summary
m (moved Talk:Associative arrays/Creation to Talk:Associative array/Creation: Named to match Associative array page)
 
(4 intermediate revisions by 4 users not shown)
Line 10:
== PHP ==
I don't know if it is relevant, but should we add user-made functions ? I know I often use a hand made function because it's really convenient... Anyway, here is the PHP Manual version, dunno if it should be added:
 
<?
// Append associative array elements
function array_push_associative(&$arr) {
$args = func_get_args();
foreach ($args as $arg) {
Line 25 ⟶ 26:
}
return $ret;
}
 
It's like [[http://fr2.php.net/array_push array_push ()]], up to the part that it actually allows associative elements to be added (pushed)... More info: http://fr2.php.net/manual/en/function.array-push.php#58705
 
== Requirements? ==
 
As stated, this task is rather meaningless, since it does not specify any kind of array semantics which must be supported. We can assume "get element" and "set element", and I think the task should require examples of these assumable operations. --[[User:Rdm|Rdm]] 18:47, 5 January 2010 (UTC)
: Not a bad point. Rather than rewriting the task description, though, I think it would be a good idea to create a replacement task and phase this one out. There aren't active contributors for all of the languages, and some languages don't get much ENA maintenance. --[[User:Short Circuit|Michael Mol]] 23:13, 5 January 2010 (UTC)