Results 1 to 2 of 2
  1. #1

    problem with foreach()

    My code:
    PHP Code:
    $result=dhd_fn_fp_broker_names_get();
        
    $options="";
        foreach(
    $result as $results) {
            
    $company_key $results['company_key'];
            
    $first_name=$results['first_name'];
            
    $last_name=$results['last_name'];
            
    $full_name strtolower($first_name." ".$last_name);
            
    $options.="<option value='$company_key'>".strtotitle($full_name)."</option>";
            } 
    is not pulling the $company_key for some reason. I get null.

    The first name and last name are getting pulled, but not the company key.

    Any help appreciated.

  2. #2
    try doing a print_r() to make sure company_key is there.

    PHP Code:
    $result=dhd_fn_fp_broker_names_get();
    $options="";
    foreach(
    $result as $results)
    {
        
    print_r($results);


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •