Title: wp all import function
Last modified: August 18, 2021

---

# wp all import function

 *  Resolved [eninunez](https://wordpress.org/support/users/eninunez/)
 * (@eninunez)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/wp-all-import-function/)
 * Hello, i have a csv feed with products and i want to compare two values from 
   csv before added to field.
    How can i get in php function the others values from
   my csv? e.g. csv {undefined1[1]} price 1 {undefined2[1]} price 2
 * <?php
    function my_convert_price($value1){ $value2='{undefined2[1]}’; ///<— how
   can i get and read this value in function? $value1='{undefined1[1]}’;
 *  if ($value1 – $svalue2 < 0 ){
    return $value1*0.038; }} ?>
 * Thanks you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/wp-all-import-function/#post-14801352)
 * Hi [@eninunez](https://wordpress.org/support/users/eninunez/),
 * > How can i get in php function the others values from my csv?
 * You can pass both elements to your function like this:
 * `[my_convert_price({undefined1[1]},{undefined2[1]})]`
 * Then, you can access the values in the function code like this:
 *     ```
       function my_convert_price( $value1, $value2 ) {
            // Do something with the values.
       }
       ```
   
 *  Thread Starter [eninunez](https://wordpress.org/support/users/eninunez/)
 * (@eninunez)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/wp-all-import-function/#post-14801360)
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘wp all import function’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [wpallimport](https://wordpress.org/support/topic-tag/wpallimport/)

 * 2 replies
 * 2 participants
 * Last reply from: [eninunez](https://wordpress.org/support/users/eninunez/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/wp-all-import-function/#post-14801360)
 * Status: resolved