2014-09-05 2 views
0

나는 이것이 왼쪽 필드 밖으로 나가는 것을 알고 있지만, 누군가가 도울 수 있는지 알고 싶었다.다른 열을 추가하고 채우려면 어떻게해야합니까?

특정 변수 (아직 변수의 이름을 알아 내지 않은 변수)의 데이터를 채우는 열을 추가하고 싶습니다. 이것은 WordPress 용 플러그인이며 개발자는 실제로 도움이되지 않습니다.

내가 생각한 마지막 도랑 노력. 다음은 코드입니다.

}$output.='><tr><th>' . __('Request For', 'wpsc-support-tickets') . '</th><th>' 
. __('Status', 'wpsc-support-tickets') . '</th><th>' 
. __('Last Reply', 'wpsc-support-tickets') 
. '</th><th>' . __('Department', 'wpsc-support-tickets') . '</th></tr>'; 

마지막 열 "부서"를 추가했습니다. 어디에서 열 "부서"에 대한 변수를 추가 할 수 있습니다 -

이제 다음 코드를보고, 내가 데이터를 채우는 방법을 파악하지 못할 다시

$output .= '<tr><td> 
<a href="" onclick="loadTicket(' . $result['primkey'] . ',\'' . $canReopen . '\'); 
return false;" '; 

if ($result['resolution'] == strtolower('open')) { 
    $resresolution = __('Open', 'wpsc-support-tickets'); 
} elseif ($result['resolution'] == strtolower('closed')) { 
    $resresolution = __('Closed', 'wpsc-support-tickets'); 
} else { 
    $resresolution = $result['resolution']; 
} 

if ($devOptions['disable_inline_styles'] == 'false') { 
    $output.='style="border:none;text-decoration:none;"'; 
}$output.='><img'; 
if ($devOptions['disable_inline_styles'] == 'false') { 
    $output.=' style="float:left;border:none;margin-right:5px;"'; 
}$output.=' src="' . plugins_url('/images/page_edit.png', __FILE__) . '" 
alt="' . __('View', 'wpsc-support-tickets') . '" /> ' . base64_decode($result['title']) . 
'</a></td><td>' . $resresolution . '</td><td>' 
. date_i18n(get_option('date_format'), 
$result['last_updated']) . ' ' . __('by', 'wpsc-support-tickets') . ' 
' . $last_staff_reply . '</td> 
</tr>'; 

(심지어 변수를 알고 가정) 변수가 $ department_var이면?

답변

0

당신은 폐쇄 </tr> 전에 혼란의 큰 덩어리의 맨 마지막에 추가 할 수 있습니다 ...

변화

...$last_staff_reply . '</td></tr>'; 

...$last_staff_reply . '</td><td>' . $department_var . '</td></tr>'; 
관련 문제