Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /** This code outputs the Custom Comment fields **/
- // set an empty array
- $cArr = array();
- // array-ify the fields
- $cfields = array_filter(explode(",", get_option('CComment_fields')));
- // add value of each field to empty array
- foreach ($cfields as $cfield){
- $cVal = get_comment_meta(get_comment_ID(), "CuCo_".$cfield);
- $cArr[] = $cVal[0];
- }
- // set variables for each item in array
- // (obviously, set these to what your's are...)
- list( $city, $state, $start, $end ) = $cArr;
- // finally, spit it all out
- // (display YOUR variables however YOU need...)
- echo "From: $city, $state <br/>";
- echo "Stayed: $start to $end <br/>";
- // reset array for next comment
- // (not sure if this is needed, set it just to be safe)
- $cArr = null;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement