Browse files

array_pop cannot get data from array_keys - fixed

  • Loading branch information...
1 parent d96df48 commit 0870351dc383530f3eb58f0e7ceb8901c9dfafd0 @andee andee committed with bbkr Feb 3, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 API/examples/php_synopsis.php
View
5 API/examples/php_synopsis.php
@@ -52,7 +52,8 @@
# since there can be only one campaign of this name
# first key is the CAMPAIGN_ID you need
-$CAMPAIGN_ID = array_pop(array_keys($result));
+$campaigns = array_keys($result);
+$CAMPAIGN_ID = array_pop($campaigns);
# add contact to 'sample_marketing' campaign
try {
@@ -83,4 +84,4 @@
print("Contact added\n");
-?>
+?>

0 comments on commit 0870351

Please sign in to comment.