Expects to be string, array given

Discussion in 'PHP' started by bradenkeith, Jul 7, 2008.

  1. #1
    How can I make it from an array into a string?

    			$tpl_fields = array();
    			$tpl_fields['row'] = $tpl_fields['blockrow'] = array();
    
    			foreach ($profile_row as $ident => $ident_ary)
    			{
    				$value = $this->get_profile_value($ident_ary);
    
    				if ($value === NULL)
    				{
    					continue;
    				}
    
    				$tpl_fields['row'] += array(
    					'PROFILE_' . strtoupper($ident) . '_VALUE'	=> $value,
    					'PROFILE_' . strtoupper($ident) . '_TYPE'	=> $ident_ary['data']['field_type'],
    					'PROFILE_' . strtoupper($ident) . '_NAME'	=> $ident_ary['data']['lang_name'],
    					'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $ident_ary['data']['lang_explain'],
    
    					'S_PROFILE_' . strtoupper($ident)			=> true
    				);
    
    				$tpl_fields['blockrow'][] = array(
    					'PROFILE_FIELD_VALUE'	=> $value,
    					'PROFILE_FIELD_TYPE'	=> $ident_ary['data']['field_type'],
    					'PROFILE_FIELD_NAME'	=> $ident_ary['data']['lang_name'],
    					'PROFILE_FIELD_EXPLAIN'	=> $ident_ary['data']['lang_explain'],
     
    					'S_PROFILE_' . strtoupper($ident)		=> true
    				);
    			}
    		
    			return urlencode($tpl_fields);
    
    PHP:
    The return urlencode is what's being a booger. Sorry if this is a newb question, as I am a newb :D
     
    bradenkeith, Jul 7, 2008 IP
  2. bradenkeith

    bradenkeith Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's fixed - nevermind.
     
    bradenkeith, Jul 7, 2008 IP