<div dir="ltr">ok got it,<div>a lil bit counter intuitive but works.</div></div><div class="gmail_extra"><br clear="all"><div>Kelvin Chua</div>
<br><br><div class="gmail_quote">On Fri, Dec 27, 2013 at 5:22 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
whenever you want to add one xavp, you must not provide the index.
Try:<br>
<br>
<div>$xavp(arr=>foo1) = 'bar1';</div><div class="im">
<div>$xavp(arr[0]=>foo2) = 'bar2';</div>
</div><div>$xavp(arr=>foo1) = 'bar3';</div>
$xavp(arr[0]=>foo2) = 'bar4';<br>
<br>
Note that is still adding as a stack, like for avp. But when you
provide an index, it is expecting to exist and overwritte if all
indexes are provided.<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
<div>On 27/12/13 09:34, Kelvin Chua wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>i'm trying to create an array (similar to sql_xquery
result) using xavp,</div>
<div>i tried the ff:</div>
<div><br>
</div>
<div>$xavp(arr[0]=>foo1) = 'bar1';</div>
<div>$xavp(arr[0]=>foo2) = 'bar2';</div>
<div>$xavp(arr[1]=>foo1) = 'bar3';</div>
$xavp(arr[1]=>foo2) = 'bar4';
<div><br>
</div>
<div>this does not work.<br>
<div><br clear="all">
<div>Kelvin Chua</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre cols="72">--
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>