PHP Scripts Development » General Web Development Forum

translate CFM into PHP

(4 posts)

Great offers not only for geeks!


  1. User has not uploaded an avatar

    pitos
    Member

    Hi, I have a problem with my site due to ColdFusion cfmail tag, so I decided translate the whole code to PHP, but I am new with this languaje and I do not know the sintaxis, so if someone knows how can I translate it, I will appreciate. Thanks.

    The follow code is for a virtual store:

    <CFLOOP collection="#Session.Carrito#" item="i">
    <cfset xnumero = #Session.Carrito[i][10]#>
    <cfif not isnumeric(#xnumero#)>
    <cfset xnumero = 1>
    </cfif>
    </CFLOOP>
    Posted 5 months ago #
  2. I don't know so much about CF (actually nothing)

    but I think it's some test inside a loop like:

    if (!is_numeric($var)) $var = 1;

    maybe you can describe the function a little bit more

    Posted 5 months ago #
  3. User has not uploaded an avatar

    pitos
    Member

    I had read something about LOOPS in PHP, and I finded the function FOREACH, I think this function is similar to CFLOOP, but I'll continue searching. Thanks for your response.

    Posted 5 months ago #
  4. yeah, I like the foreach very much, most of all if you have an associative array

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.