how can we generate coupon code in php dynamically.
Sikander Nasar
0
Light Poster
Recommended Answers
Jump to PostHi,
you can generate coupon code by implementing str_shuffle PHP function.
example codes
function get_coupon_code($string_length = 5){ $coupon_code = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz), 0, $string_length); } echo get_coupon_code(5);
If you want the …
All 3 Replies
veedeoo
474
Junior Poster
Featured Poster
Rajeev Kumar_1
0
Newbie Poster
Sikander Nasar
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.