Dear visitor, welcome to Coder Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
HTML Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
|
|
PHP Quellcode |
1 |
$alle_treffer = array_filter(create_function('$a', 'return array_search($a) === true;'), $result); |
|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 |
$send->securityToken = $TheToken; $myres = $client->GetAllOutboundUsers($send); $result = $myres->OutboundUser_x005B__x005D_; print_r($result); $a="Suchkriterium"; $alle_treffer = array_filter(create_function('$a', 'return array_search($a) === true;'), $result); print_r($alle_treffer); |
Quoted
array array_filter ( array $input [, callback $callback] )
|
|
PHP Quellcode |
1 2 |
$suche = "wert"; array_filter($result, create_function('$a', 'global $suche; return in_array($suche, $a) === true;')) |
|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 |
$send->securityToken = $TheToken; $myres = $client->GetAllOutboundUsers($send); $result = $myres->OutboundUser_x005B__x005D_; print_r($result); $suche = "wert"; $alle_treffer = (array_filter($result, create_function('$a', 'global $suche; return in_array($suche, $a) === true;'))); print_r($alle_treffer); |
|
|
HTML Code |
1 2 3 4 |
Warning: %v%v() [function.%v]: Wrong datatype for second argument in /srv/www/web2/html/provisioning/search_outbound.php(14) : runtime-created function on line 1 Warning: %v%v() [function.%v]: Wrong datatype for second argument in /srv/www/web2/html/provisioning/search_outbound.php(14) : runtime-created function on line 1 Array ( ) |
|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
$send->securityToken = $TheToken; $myres = $client->GetAllOutboundUsers($send); $result = $myres->OutboundUser_x005B__x005D_; $suche = "matthias.orczak@web.de"; $alle_treffer = (array_filter($result, create_function('$a', 'global $suche; return in_array($suche, get_object_vars($a)) === true;'))); var_dump($alle_treffer); foreach ($alle_treffer as $key=>$item) echo ''.$item->FirstName.'<br />'; echo ''.$item->LastName.'<br />'; echo ''.$item->TelephoneNumber.'<br />'; echo ''.$item->MobilePhoneNumber.'<br />'; echo ''.$item->EmailAddress.'<br />'; echo ''.$item->AccountingCode.'<br />'; echo ''.$item->CoverPage.'<br />'; echo ''.$item->OnSuccessReplyTo.'<br />'; echo ''.$item->OnFailureReplyTo.'<br />'; echo ''.$item->Archiving.'<br />'; echo ''.$item->FaxHeader.'<br />'; echo ''.$item->Custom1.'<br />'; echo ''.$item->Custom2.'<br />'; ?> |
|
|
HTML Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
|
|
PHP Quellcode |
1 2 3 4 5 |
$send->securityToken = $TheToken; $myres = $client->GetAllOutboundUsers($send); $result = $myres->OutboundUser_x005B__x005D_; $suche = $_GET['search']; $alle_treffer = (array_filter($result, create_function('$a', 'global $suche; return in_array($suche, get_object_vars($a)) === true;'))); |
) - bin halt noch Anfänger.|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
$send->securityToken = $TheToken; $myres = $client->GetAllInboundNumbers($send); $result = $myres->InboundAssociation_x005B__x005D_; $sumcount = count($result); $max = count($result); $pages = 15; $result = array_splice($result, $_GET['pagecount'], $pages); $count = count($result); echo "<table width=\"100%\">"; for($i=0; $i < $count; $i++) { if ($result[$i]->InboundUser->Destination != ""){ echo "<tr>"; echo "<td span class=\"table1\">".$result[$i]->InboundNumber->FaxNumber."</td>"; echo "<td span class=\"table1\">".$result[$i]->InboundUser->Destination . "</td>"; echo "</tr>"; }} echo "</table>"; if ($max > 15){ for($i=0;$i<$max; $i+=$pages) printf('<a href="index1.php?page=show_allinbound&pagecount=%d">%d</a>', $i, $i/$pages); }; ?> </table> <center><?php echo $s_desc_count1.$sumcount.$s_desc_count2; ?></center> |
|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
function object2array($object) { $return = NULL; if(is_array($object)) { foreach($object as $key => $value) $return[$key] = object2array($value); } else { $var = get_object_vars($object); if($var) { foreach($var as $key => $value) $return[$key] = object2array($value); } else return strval($object); // strval and everything is fine } return $return; } |