Your cart
  • IMG
    {{cart_item.name}}
    {{cart_item.variation_attribute_name}}: {{cart_item.variation_attribute_label}}
    {{cart_item.item_unit}}: {{ setCurrency(cart_item.price)}}
    {{ setCurrency(cart_item.price*cart_item.quantity)}}
    Invalid quantity more than stock
Total :
{{setCurrency(cart.sub_total)}}

There is no item in the cart. If you want to buy, Please click here.

ইউজার ডিফাইনড ফাংশন(User defined function)

পিএইচপি(PHP)টিউটোরিয়াল

Created by : mamun_1
tutorial
Programming, Software and application
805
2020-10-03 12:17:22

আমাদের নানা কাজে নানা ধরণের ফাংশন প্রয়োজন হয়, এই সব ক্ষেত্রে আমরা নিজেরাই ফাংশন তৈরি করে নিতে পারি বা অন্যের তৈরি করা ফাংশন ব্যবহার করতে পারি । যে সব ফাংশন ইউজার অর্থাৎ আমাদের (আমার নিজের বা অন্য কোন ডেভেলপারের) তৈরি করা সেগুলোকে ইউজার ডিফাইনড ফাংশন বলা হয়

Example:

<?php

function sayHello($name)

{

return "Hello {$name}!";

}

?>

এখানে আমরা একটি ইউজার ডিফাইনড ফাংশন দেখছি, এই ফাংশনটি একটি নাম এ্যাক্সেপ্ট করে একটি সুন্দর গ্রিটিং রিটার্ন করে ।