• Hi there, I was wondering if some php coding expert could help me out. I’m having some problems inserting php code within another php code.

    I have this code from a contact form plugin for wordpress

    $wpcf_strings = array(
    		'name' => '<div class="contactleft"><input type="text" name="wpcf_your_name" id="wpcf_your_name" class="contactformbg" size="22" maxlength="30" value="' . (isset($_POST['wpcf_your_name']) ? $_POST['wpcf_your_name'] :'') . '" /> <div class="contacttext">Name ' . __('*', 'wpcf') . '</div></div>',
    		'email' => '<div class="contactleft"><input type="text" name="wpcf_email" id="wpcf_email" class="contactformbg" size="22" maxlength="30" value="' . (isset($_POST['wpcf_email']) ? $_POST['wpcf_email'] : '') . '" /> <div class="contacttext">Mail ' . __('*', 'wpcf') . '</div></div>',
    		'msg' => '<div class="contactleft"><textarea name="wpcf_msg" id="wpcf_msg" class="contactformbg" cols="55" rows="4" >' . (isset($_POST['wpcf_msg']) ? $_POST['wpcf_msg'] : '' ) . '</textarea></div>',
    		'error' => '');

    And then on the other hand I have this code from the qTranslate plugin I wanted to insert into the contact form so I can have the field titles in different languages

    <?php _e('<!--:en--> name <!--:--><!--:es--> nombre <!--:--><!--:ca--> nom <!--:-->'); ?>

    So in a perfect world I would want to use these together like

    $wpcf_strings = array(
    ‘name’ => ‘<div class=”contactleft”><input type=”text” name=”wpcf_your_name” id=”wpcf_your_name” class=”contactformbg” size=”22″ maxlength=”30″ value=”‘ . (isset($_POST[‘wpcf_your_name’]) ? $_POST[‘wpcf_your_name’] :”) . ‘” /> <div class=”contacttext”><?php _e(‘<!–:en–> name <!–:–><!–:es–> nombre <!–:–><!–:ca–> nom <!–:–>’); ?> ‘ . __(‘*’, ‘wpcf’) . ‘</div></div>’,

    If someone could help me, I would really appreciate it.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Help from PHP coding experts’ is closed to new replies.